Report test results in PRs #47
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
# This workflow will install Python dependencies, run tests with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python package | |
on: | |
push: | |
branches: | |
- "main" | |
- "develop" | |
pull_request: | |
branches: | |
- "main" | |
- "develop" | |
jobs: | |
test: | |
name: Test on Python ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
make run-ci | |
- name: Create coverage badge | |
uses: gaelgirodon/[email protected] | |
with: | |
gist-id: ${{ vars.GIST_ID_BADGES }} | |
token: ${{ secrets.GIST_TOKEN }} | |
prefix: ${{ github.event.repository.name }}_${{ matrix.python-version }} | |
- name: Upload Test Results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test Results (Python ${{ matrix.python-version }}) | |
path: report.xml | |
report: | |
name: Test Results | |
runs-on: ubuntu-latest | |
needs: test | |
permissions: | |
checks: write | |
# only needed unless run with comment_mode: off | |
pull-requests: write | |
# only needed for private repository | |
contents: read | |
# only needed for private repository | |
issues: read | |
if: always() | |
steps: | |
- name: Download Test Results | |
uses: actions/download-artifact@v4 | |
with: | |
name: artifacts | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
files: "artifacts/**/*.xml" |