Merge pull request #243 from sgibson91/pre-commit-ci-update-config #733
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: CI Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
# Also run weekly, to make sure nothing has broken in the interim | |
schedule: | |
- cron: "0 0 * * 1" | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
# environment: codecov | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install requirements | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
python -m pip install -r dev-requirements.txt | |
- name: Run test suite | |
run: | | |
python -m coverage run -m pytest -vvv --color=yes | |
- name: Print coverage report | |
run: | | |
coverage report && coverage xml | |
# - name: "Upload coverage to Codecov" | |
# if: ${{ matrix.python-version == '3.12' }} | |
# uses: codecov/codecov-action@v4 | |
# with: | |
# fail_ci_if_error: true | |
# token: ${{ secrets.CODECOV_TOKEN }} |