Skip to content

Commit

Permalink
Merge pull request #17 from adyanth/test-pipeline
Browse files Browse the repository at this point in the history
Fix pipeline
  • Loading branch information
adyanth authored Oct 18, 2024
2 parents eeb9e58 + c26fc64 commit 07844ca
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
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

0 comments on commit 07844ca

Please sign in to comment.