Skip to content

Commit

Permalink
Add JUnit XML report for pytest results
Browse files Browse the repository at this point in the history
Created a new `junit.xml` file to store the results of the pytest test suite in JUnit XML format. This helps in integrating the test results with CI/CD tools for better visualization and reporting.
  • Loading branch information
cdot65 committed Oct 18, 2024
1 parent d573fef commit f80ffd7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,33 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
pip install poetry
poetry install
- name: Run Tests with Coverage
env:
CLIENT_ID: fake_client_id
CLIENT_SECRET: fake_client_secret
TSG_ID: fake_tsg_id
run: |
poetry run pytest -m "not api" --cov=scm --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
Loading

0 comments on commit f80ffd7

Please sign in to comment.