|
6 | 6 | jobs: |
7 | 7 | python-build: |
8 | 8 | name: ποΈ Build Python wheels |
9 | | - strategy: |
10 | | - matrix: |
11 | | - python: |
12 | | - - '3.13' |
13 | 9 | runs-on: ubuntu-latest |
14 | 10 | steps: |
15 | | - - name: π₯ Check-out |
16 | | - uses: actions/checkout@v4 |
17 | | - - name: π§° Install Python |
18 | | - uses: actions/setup-python@v5 |
19 | | - with: |
20 | | - python-version: ${{ matrix.python }} |
21 | | - cache: pip |
22 | | - cache-dependency-path: pyproject.toml |
23 | | - - name: π§° Install dependencies |
24 | | - run: pip install build twine |
25 | | - - name: ποΈ Build Python wheels |
26 | | - run: python -m build |
27 | | - - name: π§ͺ Check package bundles |
28 | | - run: twine check dist/* |
29 | | - - name: π€ Upload Python wheels |
30 | | - uses: actions/upload-artifact@v4 |
31 | | - if: matrix.python == '3.13' |
32 | | - with: |
33 | | - name: wheels |
34 | | - path: dist |
| 11 | + - name: π₯ Check-out |
| 12 | + uses: actions/checkout@v5 |
| 13 | + - name: π§° Install Python |
| 14 | + uses: actions/setup-python@v5 |
| 15 | + with: |
| 16 | + python-version: "3.13" |
| 17 | + cache: pip |
| 18 | + cache-dependency-path: pyproject.toml |
| 19 | + - name: π§° Install dependencies |
| 20 | + run: pip install build twine |
| 21 | + - name: ποΈ Build Python wheels |
| 22 | + run: python -m build |
| 23 | + - name: π§ͺ Check package bundles |
| 24 | + run: twine check dist/* |
| 25 | + - name: π€ Upload Python wheels |
| 26 | + uses: actions/upload-artifact@v4 |
| 27 | + with: |
| 28 | + name: wheels |
| 29 | + path: dist |
35 | 30 | python-code-check: |
36 | 31 | name: π Check Python code |
37 | | - strategy: |
38 | | - matrix: |
39 | | - python: |
40 | | - - '3.13' |
41 | 32 | runs-on: ubuntu-latest |
42 | 33 | steps: |
43 | | - - name: π₯ Check-out |
44 | | - uses: actions/checkout@v4 |
45 | | - - name: π§° Install Python |
46 | | - uses: actions/setup-python@v5 |
47 | | - with: |
48 | | - python-version: ${{ matrix.python }} |
49 | | - cache: pip |
50 | | - cache-dependency-path: pyproject.toml |
51 | | - - name: π§° Install dependencies |
52 | | - run: pip install .[tests] |
53 | | - - name: π Check Python code |
54 | | - run: ruff check . |
| 34 | + - name: π₯ Check-out |
| 35 | + uses: actions/checkout@v5 |
| 36 | + - name: π§° Install Python |
| 37 | + uses: actions/setup-python@v5 |
| 38 | + with: |
| 39 | + python-version: "3.13" |
| 40 | + cache: pip |
| 41 | + cache-dependency-path: pyproject.toml |
| 42 | + - name: π§° Install dependencies |
| 43 | + run: pip install .[tests] |
| 44 | + - name: π Check Python code |
| 45 | + run: ruff check . |
55 | 46 | python-typing: |
56 | 47 | name: π Check Python static typing |
57 | | - strategy: |
58 | | - matrix: |
59 | | - python: |
60 | | - - '3.13' |
61 | 48 | runs-on: ubuntu-latest |
62 | 49 | steps: |
63 | | - - name: π₯ Check-out |
64 | | - uses: actions/checkout@v4 |
65 | | - - name: π§° Install Python |
66 | | - uses: actions/setup-python@v5 |
67 | | - with: |
68 | | - python-version: ${{ matrix.python }} |
69 | | - cache: pip |
70 | | - cache-dependency-path: pyproject.toml |
71 | | - - name: π§° Install dependencies |
72 | | - run: pip install .[tests] |
73 | | - - name: π Check Python static typing |
74 | | - run: mypy . |
75 | | - python-security: |
76 | | - name: π Check Python code security |
77 | | - strategy: |
78 | | - matrix: |
79 | | - python: |
80 | | - - '3.13' |
81 | | - runs-on: ubuntu-latest |
82 | | - steps: |
83 | | - - name: π₯ Check-out |
84 | | - uses: actions/checkout@v4 |
85 | | - - name: π§° Install Python |
86 | | - uses: actions/setup-python@v5 |
87 | | - with: |
88 | | - python-version: ${{ matrix.python }} |
89 | | - cache: pip |
90 | | - cache-dependency-path: pyproject.toml |
91 | | - - name: π§° Install dependencies |
92 | | - run: pip install .[tests] |
93 | | - - name: π Check Python code security |
94 | | - run: bandit -c pyproject.toml -r . |
| 50 | + - name: π₯ Check-out |
| 51 | + uses: actions/checkout@v5 |
| 52 | + - name: π§° Install Python |
| 53 | + uses: actions/setup-python@v5 |
| 54 | + with: |
| 55 | + python-version: "3.13" |
| 56 | + cache: pip |
| 57 | + cache-dependency-path: pyproject.toml |
| 58 | + - name: π§° Install dependencies |
| 59 | + run: pip install .[tests] |
| 60 | + - name: π Check Python static typing |
| 61 | + run: mypy . |
95 | 62 | python-test: |
96 | 63 | name: π§ͺ Test Python code |
97 | | - strategy: |
98 | | - matrix: |
99 | | - python: |
100 | | - - '3.13' |
101 | 64 | runs-on: ubuntu-latest |
102 | 65 | steps: |
103 | | - - name: π₯ Check-out |
104 | | - uses: actions/checkout@v4 |
105 | | - - name: π§° Install Python |
106 | | - uses: actions/setup-python@v5 |
107 | | - with: |
108 | | - python-version: ${{ matrix.python }} |
109 | | - cache: pip |
110 | | - cache-dependency-path: pyproject.toml |
111 | | - - name: π§° Install dependencies |
112 | | - run: pip install .[tests] |
113 | | - - name: π§ͺ Test Python code |
114 | | - run: pytest --cov --cov-report=xml archive_query_log |
115 | | - - name: π€ Upload coverage to Codecov |
116 | | - uses: codecov/codecov-action@v5 |
117 | | - if: matrix.python == '3.13' |
118 | | - with: |
119 | | - token: ${{ secrets.CODECOV_TOKEN }} |
| 66 | + - name: π₯ Check-out |
| 67 | + uses: actions/checkout@v5 |
| 68 | + - name: π§° Install Python |
| 69 | + uses: actions/setup-python@v5 |
| 70 | + with: |
| 71 | + python-version: "3.13" |
| 72 | + cache: pip |
| 73 | + cache-dependency-path: pyproject.toml |
| 74 | + - name: π§° Install dependencies |
| 75 | + run: pip install .[tests] |
| 76 | + - name: π§ͺ Test Python code |
| 77 | + run: pytest --cov --cov-report=xml . |
| 78 | + - name: π€ Upload coverage to Codecov |
| 79 | + uses: codecov/codecov-action@v5 |
| 80 | + with: |
| 81 | + token: ${{ secrets.CODECOV_TOKEN }} |
120 | 82 | docker-build: |
121 | 83 | name: ποΈ Build Docker image |
122 | 84 | runs-on: ubuntu-latest |
123 | 85 | steps: |
124 | | - - name: π₯ Check-out |
125 | | - uses: actions/checkout@v4 |
126 | | - - name: π§° Set up QEMU |
127 | | - uses: docker/setup-qemu-action@v3 |
128 | | - - name: π§° Set up Docker Buildx |
129 | | - uses: docker/setup-buildx-action@v3 |
130 | | - - name: ποΈ Build Docker image |
131 | | - uses: docker/build-push-action@v6 |
132 | | - with: |
133 | | - context: . |
134 | | - push: false |
| 86 | + - name: π₯ Check-out |
| 87 | + uses: actions/checkout@v5 |
| 88 | + - name: π§° Set up QEMU |
| 89 | + uses: docker/setup-qemu-action@v3 |
| 90 | + - name: π§° Set up Docker Buildx |
| 91 | + uses: docker/setup-buildx-action@v3 |
| 92 | + - name: ποΈ Build Docker image |
| 93 | + uses: docker/build-push-action@v6 |
| 94 | + with: |
| 95 | + context: . |
| 96 | + push: false |
135 | 97 | python-publish: |
136 | 98 | name: π Publish Python wheels |
137 | 99 | if: github.event_name == 'push' && endsWith(github.event.base_ref, 'main') && startsWith(github.ref, 'refs/tags') |
138 | 100 | needs: |
139 | | - - python-build |
140 | | - - python-code-check |
141 | | - - python-typing |
142 | | - - python-security |
143 | | - - python-test |
144 | | - - docker-build |
| 101 | + - python-build |
| 102 | + - python-code-check |
| 103 | + - python-typing |
| 104 | + - python-test |
| 105 | + - docker-build |
145 | 106 | runs-on: ubuntu-latest |
146 | 107 | permissions: |
147 | 108 | id-token: write |
148 | 109 | steps: |
149 | | - - name: π₯ Check-out |
150 | | - uses: actions/checkout@v4 |
151 | | - - name: π₯ Download Python wheels |
152 | | - uses: actions/download-artifact@v4 |
153 | | - with: |
154 | | - name: wheels |
155 | | - path: dist |
156 | | - - name: π Publish Python wheels |
157 | | - uses: pypa/gh-action-pypi-publish@release/v1 |
| 110 | + - name: π₯ Check-out |
| 111 | + uses: actions/checkout@v5 |
| 112 | + - name: π₯ Download Python wheels |
| 113 | + uses: actions/download-artifact@v5 |
| 114 | + with: |
| 115 | + name: wheels |
| 116 | + path: dist |
| 117 | + - name: π Publish Python wheels |
| 118 | + uses: pypa/gh-action-pypi-publish@release/v1 |
158 | 119 | docker-publish: |
159 | 120 | name: π Publish Docker image |
160 | 121 | if: github.event_name == 'push' && endsWith(github.event.base_ref, 'main') && startsWith(github.ref, 'refs/tags') |
161 | 122 | permissions: |
162 | 123 | packages: write |
163 | 124 | needs: |
164 | | - - python-build |
165 | | - - python-code-check |
166 | | - - python-typing |
167 | | - - python-security |
168 | | - - python-test |
169 | | - - docker-build |
| 125 | + - python-build |
| 126 | + - python-code-check |
| 127 | + - python-typing |
| 128 | + - python-test |
| 129 | + - docker-build |
170 | 130 | runs-on: ubuntu-latest |
171 | 131 | steps: |
172 | | - - name: π₯ Check-out |
173 | | - uses: actions/checkout@v4 |
174 | | - - name: π§° Set up QEMU |
175 | | - uses: docker/setup-qemu-action@v3 |
176 | | - - name: π§° Set up Docker Buildx |
177 | | - uses: docker/setup-buildx-action@v3 |
178 | | - - name: π Login to GitHub Packages |
179 | | - uses: docker/login-action@v3 |
180 | | - with: |
181 | | - registry: ghcr.io |
182 | | - username: ${{ github.actor }} |
183 | | - password: ${{ secrets.GITHUB_TOKEN }} |
184 | | - - name: βΉοΈ Extract image metadata |
185 | | - id: meta |
186 | | - uses: docker/metadata-action@v5 |
187 | | - with: |
188 | | - images: | |
189 | | - ghcr.io/${{ github.repository }} |
190 | | - - name: π Build and push image |
191 | | - uses: docker/build-push-action@v6 |
192 | | - with: |
193 | | - context: . |
194 | | - push: true |
195 | | - tags: ${{ steps.meta.outputs.tags }} |
196 | | - labels: ${{ steps.meta.outputs.labels }} |
| 132 | + - name: π₯ Check-out |
| 133 | + uses: actions/checkout@v5 |
| 134 | + - name: π§° Set up QEMU |
| 135 | + uses: docker/setup-qemu-action@v3 |
| 136 | + - name: π§° Set up Docker Buildx |
| 137 | + uses: docker/setup-buildx-action@v3 |
| 138 | + - name: π Login to GitHub Packages |
| 139 | + uses: docker/login-action@v3 |
| 140 | + with: |
| 141 | + registry: ghcr.io |
| 142 | + username: ${{ github.actor }} |
| 143 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 144 | + - name: βΉοΈ Extract image metadata |
| 145 | + id: meta |
| 146 | + uses: docker/metadata-action@v5 |
| 147 | + with: |
| 148 | + images: | |
| 149 | + ghcr.io/${{ github.repository }} |
| 150 | + - name: π Build and push image |
| 151 | + uses: docker/build-push-action@v6 |
| 152 | + with: |
| 153 | + context: . |
| 154 | + push: true |
| 155 | + tags: ${{ steps.meta.outputs.tags }} |
| 156 | + labels: ${{ steps.meta.outputs.labels }} |
197 | 157 | github-release: |
198 | 158 | name: π Create GitHub release |
199 | 159 | if: github.event_name == 'push' && endsWith(github.event.base_ref, 'main') && startsWith(github.ref, 'refs/tags') |
200 | 160 | needs: |
201 | | - - python-build |
202 | | - - python-code-check |
203 | | - - python-typing |
204 | | - - python-security |
205 | | - - python-test |
206 | | - - python-publish |
207 | | - - docker-build |
208 | | - - docker-publish |
| 161 | + - python-build |
| 162 | + - python-code-check |
| 163 | + - python-typing |
| 164 | + - python-test |
| 165 | + - python-publish |
| 166 | + - docker-build |
| 167 | + - docker-publish |
209 | 168 | permissions: |
210 | 169 | contents: write |
211 | 170 | runs-on: ubuntu-latest |
212 | 171 | steps: |
213 | | - - name: π₯ Check-out |
214 | | - uses: actions/checkout@v4 |
215 | | - - name: π₯ Download Python wheels |
216 | | - uses: actions/download-artifact@v4 |
217 | | - with: |
218 | | - name: wheels |
219 | | - path: dist |
220 | | - - name: π Create GitHub release |
221 | | - uses: softprops/action-gh-release@v2 |
222 | | - with: |
223 | | - name: Release ${{ github.ref_name }} |
224 | | - files: dist/* |
225 | | - fail_on_unmatched_files: true |
226 | | - draft: false |
227 | | - prerelease: false |
228 | | - generate_release_notes: true |
| 172 | + - name: π₯ Check-out |
| 173 | + uses: actions/checkout@v5 |
| 174 | + - name: π₯ Download Python wheels |
| 175 | + uses: actions/download-artifact@v5 |
| 176 | + with: |
| 177 | + name: wheels |
| 178 | + path: dist |
| 179 | + - name: π Create GitHub release |
| 180 | + uses: softprops/action-gh-release@v2 |
| 181 | + with: |
| 182 | + name: Release ${{ github.ref_name }} |
| 183 | + files: dist/* |
| 184 | + fail_on_unmatched_files: true |
| 185 | + draft: false |
| 186 | + prerelease: false |
| 187 | + generate_release_notes: true |
0 commit comments