Run tests in CI #16
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: Unit tests | |
on: [pull_request, push, workflow_dispatch] | |
jobs: | |
test: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
# Issue: https://github.com/actions/checkout/issues/211#issuecomment-1368283898 | |
# - name: Chown user | |
# run: | | |
# sudo chown -R $USER:$USER $GITHUB_WORKSPACE | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install dependencies | |
run: poetry install | |
- name: Test | |
shell: bash | |
run: poetry run j ci | |
# Report only changed files because the result is too large | |
- name: Pytest Coverage Comment | |
uses: MishaKav/pytest-coverage-comment@main | |
id: coverage_comment | |
with: | |
pytest-coverage-path: tests/coverage/pytest-coverage.txt | |
junitxml-path: tests/coverage/pytest.xml | |
report-only-changed-files: true |