Skip to content

Update tests and CI for 2023-W50 #116

Update tests and CI for 2023-W50

Update tests and CI for 2023-W50 #116

Workflow file for this run

name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "0 5 * * *"
# Cancel previous runs that have not completed
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
pytest:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
fail-fast: false

Check failure on line 32 in .github/workflows/pytest.yaml

View workflow run for this annotation

GitHub Actions / Test

Invalid workflow file

The workflow is not valid. .github/workflows/pytest.yaml (Line: 32, Col: 5): Unexpected value 'fail-fast'
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-py${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: "**/pyproject.toml"
- name: Install the Python package and dependencies
run: pip install --upgrade --upgrade-strategy=eager .[tests]
- name: Run test suite using pytest
run: |
pytest transport_data \
--trace-config --color=yes --verbose \
--cov-report=term --cov-report=xml \
--numprocesses auto
shell: bash
- name: Upload test coverage to Codecov.io
uses: codecov/codecov-action@v3
pre-commit:
name: Code quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Force recreation of pre-commit virtual environment for mypy
if: github.event_name == 'schedule' # Comment this line to run on a PR
run: gh cache list -L 999 | cut -f2 | grep pre-commit | xargs -I{} gh cache delete "{}" || true
env: { GH_TOKEN: "${{ github.token }}" }
- uses: pre-commit/[email protected]