fix changed variable name #1633
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 and coverage report | |
# Triggers the workflow on push for all branches and PR only for main | |
on: | |
push: | |
paths-ignore: | |
pyproject.toml | |
pull_request: | |
branches: | |
- main | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out repo and set up Python | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
# Use cached python and dependencies, install poetry | |
- name: "Setup Python, Poetry and Dependencies" | |
uses: packetcoders/action-setup-cache-python-poetry@main | |
with: | |
python-version: 3.9 | |
poetry-version: 1.8.3 | |
- name: Install project dependencies | |
run: poetry install | |
# Run pytest with coverage report, saving to xml | |
- name: Run tests on python 3.9 | |
run: | | |
poetry run pytest --cov --cov-report xml:cobertura.xml --full-trace --show-capture=no -sv -n auto tests/ | |
# Take report and upload to coveralls | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./cobertura.xml |