Split tox files #460
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit Test | |
on: [push] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["python2.7", "python3.3", "python3.4", "python3.5", "python3.6", "python3.7", "python3.8", "python3.9", "python3.10", "python3.11", "python3.12", "python3.13", "pypy", "pypy3"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
fetch-tags: 'true' | |
show-progress: 'false' | |
- name: Set version statically | |
run: | | |
VERSION=0.0.0 | |
sed -i "s/setup_requires=.*/version='$VERSION',/; s/use_scm_version=.*//" setup.py | |
- name: Run tests | |
uses: ./.github/actions/run-in-container | |
with: | |
image: danielflook/python-minifier-build:${{ matrix.python }}-2024-09-15 | |
run: | | |
tox -r -e $(echo "${{ matrix.python }}" | tr -d .) | |
mv .coverage .coverage.${{ matrix.python }} | |
ls -la .coverage.${{ matrix.python }} | |
- name: Set version statically | |
run: | | |
ls -la | |
- name: Upload coverage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-${{ matrix.python }} | |
path: .coverage.${{ matrix.python }} | |
if-no-files-found: error | |
include-hidden-files: true | |
retention-days: 1 | |
coverage: | |
name: Compute Coverage | |
runs-on: ubuntu-latest | |
needs: test | |
container: | |
image: danielflook/python-minifier-build:python3.13-2024-09-15 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
fetch-tags: 'true' | |
show-progress: 'false' | |
- name: Download coverage | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: coverage-* | |
merge-multiple: true | |
- name: Coverage Report | |
run: | | |
pip3 install coverage | |
coverage combine | |
coverage report --format markdown |