Skip to content

flail: run python2.7 in docker #37

flail: run python2.7 in docker

flail: run python2.7 in docker #37

Workflow file for this run

name: Tests

Check failure on line 1 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / Tests

Invalid workflow file

The workflow is not valid. .github/workflows/tests.yml: (Line: 19, Col: 40, Idx: 422) - (Line: 19, Col: 46, Idx: 428): While scanning a plain scalar, find unexpected ':'.
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() }}