-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (68 loc) · 2.06 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# 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", "3.13"]
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: Comment 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
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: "**/*.xml"
- name: Fail if any matrix job failed
if: needs.test.result != 'success'
uses: actions/github-script@v3
with:
script: |
core.setFailed('Some matrix job failed. Please check the logs.')