-
-
Notifications
You must be signed in to change notification settings - Fork 14
86 lines (78 loc) · 2.85 KB
/
ci.yml
File metadata and controls
86 lines (78 loc) · 2.85 KB
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
85
86
name: CI
on:
push:
branches:
- main
pull_request:
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
change-detection:
name: 🔍 Change
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@1ebbafc839b73f2edc0559d5456bfb8f848043fd # v1.17.14
python-tests:
name: 🐍 Test
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, windows-2025]
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@1ebbafc839b73f2edc0559d5456bfb8f848043fd # v1.17.14
with:
runs-on: ${{ matrix.runs-on }}
python-coverage:
name: 🐍 Coverage
needs: [change-detection, python-tests]
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-coverage.yml@1ebbafc839b73f2edc0559d5456bfb8f848043fd # v1.17.14
permissions:
contents: read
id-token: write
python-linter:
name: 🐍 Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@1ebbafc839b73f2edc0559d5456bfb8f848043fd # v1.17.14
with:
enable-ty: true
enable-mypy: false
build-sdist:
name: 🚀 CD
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cd)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@1ebbafc839b73f2edc0559d5456bfb8f848043fd # v1.17.14
build-wheel:
name: 🚀 CD
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cd)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-build.yml@1ebbafc839b73f2edc0559d5456bfb8f848043fd # v1.17.14
# this job does nothing and is only used for branch protection
required-checks-pass:
name: 🚦 Check
if: always()
needs:
- change-detection
- python-tests
- python-coverage
- python-linter
- build-sdist
- build-wheel
runs-on: ubuntu-slim
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
allowed-skips: >-
${{
fromJSON(needs.change-detection.outputs.run-python-tests)
&& '' || 'python-tests,python-coverage,python-linter,'
}}
${{
fromJSON(needs.change-detection.outputs.run-cd)
&& '' || 'build-sdist,build-wheel,'
}}
jobs: ${{ toJSON(needs) }}