24
24
25
25
jobs :
26
26
build :
27
- name : Build distribution 📦
28
- runs-on : ubuntu-24.04
29
- timeout-minutes : 5
30
-
31
- steps :
32
- - uses : actions/checkout@v4
33
- with :
34
- persist-credentials : false
35
- - name : Install uv
36
- # yamllint disable-line rule:line-length
37
- uses : astral-sh/setup-uv@c7f87aa956e4c323abf06d5dec078e358f6b4d04 # v6.0.0
38
- with :
39
- # yamllint disable-line rule:line-length
40
- enable-cache : | # zizmor: ignore[cache-poisoning] cache is disabled when publishing to prevent poisoning
41
- ${{ github.ref_type == 'tag' && 'false' || 'auto' }}
42
- - name : Build distribution 📦
43
- run : uv build
44
- - name : Check distribution 📦
45
- run : uvx twine check --strict dist/*
46
- - name : Upload distribution 📦
47
- uses : actions/upload-artifact@v4
48
- with :
49
- name : python-package-distributions
50
- path : dist/
27
+ uses : ./.github/workflows/reusable-build.yml
51
28
52
29
test :
53
- name : Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
54
- runs-on : ${{ matrix.os }}
55
- continue-on-error : ${{ matrix.experimental }}
56
30
strategy :
57
31
matrix :
58
32
python-version :
@@ -76,43 +50,16 @@ jobs:
76
50
python-version : 3.11
77
51
os : ubuntu-24.04
78
52
fail-fast : false
79
- env :
80
- UV_FROZEN : 1
81
- timeout-minutes : 5
82
-
83
- steps :
84
- - name : Checkout
85
- uses : actions/checkout@v4
86
- with :
87
- persist-credentials : false
88
- submodules : true
89
- - name : Install uv
90
- # yamllint disable-line rule:line-length
91
- uses : astral-sh/setup-uv@c7f87aa956e4c323abf06d5dec078e358f6b4d04 # v6.0.0
92
- with :
93
- python-version : ${{ matrix.python-version }}
94
- # yamllint disable-line rule:line-length
95
- enable-cache : | # zizmor: ignore[cache-poisoning] cache is disabled when publishing to prevent poisoning
96
- ${{ github.ref_type == 'tag' && 'false' || 'auto' }}
97
- - name : Run pre-commit hooks
98
- run : |
99
- uv run make pre-commit
100
- - name : Run unittests
101
- env :
102
- COLOR : ' yes'
103
- run : |
104
- uv run make mototest
105
- - name : Upload coverage to Codecov
106
- if : ${{ matrix.upload-coverage }}
53
+ uses : ./.github/workflows/reusable-test.yml
54
+ with :
55
+ python-version : ${{ matrix.python-version }}
56
+ os : ${{ matrix.os }}
57
+ continue-on-error : ${{ matrix.experimental }}
58
+ enable-cache : ${{ github.ref_type == 'tag' && 'false' || 'auto' }}
59
+ upload-coverage : ${{ matrix.upload-coverage }}
60
+ secrets :
107
61
# yamllint disable-line rule:line-length
108
- uses : codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
109
- with :
110
- token : ${{ secrets.CODECOV_TOKEN }} # not required for public repos
111
- files : ./coverage.xml
112
- flags : unittests # optional
113
- name : codecov-umbrella # optional
114
- fail_ci_if_error : true # optional (default = false)
115
- verbose : true # optional (default = false)
62
+ codecov-token : ${{ matrix.upload-coverage && secrets.CODECOV_TOKEN || '' }}
116
63
117
64
zizmor :
118
65
uses : ./.github/workflows/reusable-zizmor.yml
0 commit comments