bugfix(backend): fix some bugs in axons set #10
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: Pytest & code coverage | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
- dev | |
paths: | |
- "paibox/**" | |
- "tests/**" | |
- ".github/workflows/codecov.yml" | |
- "pyproject.toml" | |
- "poetry.lock" | |
permissions: | |
contents: read | |
jobs: | |
pytest: | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v3 | |
- name: Install test dependencies | |
run: | | |
poetry install --with test --sync | |
- name: Run pytest | |
run: | | |
poetry run pytest --cov-append --cov-report=xml --junitxml=junit.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
fail_ci_if_error: true | |
flags: unittests | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload test results to Codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
fail_ci_if_error: true | |
flags: unittests | |
token: ${{ secrets.CODECOV_TOKEN }} |