Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pipeline #17

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
21 changes: 14 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Python Test

on:
workflow_dispatch:
push:
branches:
- 'main'
pull_request:
branches:
- '*'
permissions:
contents: write
checks: write
pull-requests: write

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
test:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -24,10 +24,17 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
run: echo ${{ matrix.python-version }} && python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Test
run: python -m pytest --junitxml=junit/test-results.xml --cov=main --cov-report=xml --cov-report=html
run: python -m pytest --junitxml=pytest.xml --cov=main --cov-report=xml:coverage.xml | tee pytest-coverage.txt
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
if: ${{ matrix.python-version }} == "3.13"
with:
pytest-coverage-path: ./pytest-coverage.txt
pytest-xml-coverage-path: ./coverage.xml
junitxml-path: ./pytest.xml
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ venv/
__pycache__/
.coverage
coverage.xml
htlmcov/
junit/
pytest.xml
pytest-coverage.txt
.ruff_cache
.DS_Store