Fix command syntax #13
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 | |
# FIXME: This is ugly; move this inside `j test`. | |
run: poetry run j test -- -- --junitxml=tests/coverage/pytest.xml --cov-report= --cov-report=html:tests/coverage/html --cov=yaml_ld | tee tests/coverage/pytest-coverage.txt | |
# 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 |