flail: run python2.7 in docker #37
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: Tests | ||
Check failure on line 1 in .github/workflows/tests.yml GitHub Actions / TestsInvalid workflow file
|
||
on: | ||
push: | ||
branches: ["*"] | ||
pull_request: | ||
branches: [main] | ||
jobs: | ||
tests: | ||
name: Python ${{ matrix.python }} ${{ matrix.os }} | ||
runs-on: ${{ matrix.os || 'ubuntu-latest' }} | ||
container: ${{ matrix.container }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: ["3.8", "3.9", "3.10", "3.11", "3.12", pypy3.8, pypy3.10] | ||
include: | ||
- {python: "2.7", container: python:2.7-stretch, tox3: true} | ||
- {python: "3.6", os: ubuntu-20.04, tox3: true} | ||
- {python: "3.7", tox3: true} | ||
- {python: pypy2.7, tox3: true} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
id: setup-python | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- run: python -m pip install --upgrade pip setuptools | ||
- name: Install tox4 | ||
run: pip install tox | ||
if: ${{ ! matrix.tox3 }} | ||
- name: Install tox3 | ||
run: pip install 'tox<4' 'virtualenv<20.22.0' | ||
if: ${{ matrix.tox3 }} | ||
- name: Compute tox env name | ||
run: | | ||
toxenv=$(python -c ' | ||
ver=r"${{ matrix.python }}".replace(".", "") | ||
print("py" + ver if ver[0].isdigit() else ver) | ||
') | ||
echo toxenv is "$toxenv"; | ||
echo "TOXENV=$toxenv" >> "$GITHUB_ENV" | ||
- name: Test with tox | ||
run: tox | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-data | ||
path: .coverage.* | ||
coverage: | ||
needs: tests | ||
if: ${{ success() || failure() }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: coverage-data | ||
- run: python -m pip install tox | ||
- run: tox -e cover-report | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: python -m pip install pre-commit tox | ||
- run: pre-commit run -a | ||
- run: tox r -e lint | ||
if: ${{ success() || failure() }} |