forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (76 loc) · 2.89 KB
/
on-pull-request.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
---
# Full PR suite. PRs need to pass this pipeline in order to be moved to the
# merge queue, where they'll use the next rule as the branch-protection rule
# for the final merge to the base branch.
name: Pull Requests
on:
pull_request:
branches: [main, "stable/*"]
merge_group:
concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
# The preliminary stage should be small in both total runtime (including
# provisioning) and resources required. About half of PR commits result in
# a CI failure, and over 90% of these are in linting, documention or a test
# failure that would affect _any_ OS or Python version. The goal in the
# first stage is to catch the vast majority of failures with minimal cost.
lint-docs:
if: github.repository_owner == 'Qiskit'
name: Docs and Lint
uses: ./.github/workflows/lint_docs.yml
preliminary-tests:
name: Preliminary Tests
uses: ./.github/workflows/test-linux.yml
if: github.repository_owner == 'Qiskit'
with:
python-version: "3.9"
# A PR is more likely to fail CI because it introduces a logic error
# into an existing test than because it adds a new test / optional
# dependency that isn't accounted for in the test-skipping logic
# (and such a failure would need fewer iterations to fix). We want
# to fail fast in the first CI stage.
install-optionals: true
test-rust: true
test-images: true
# The rest of the PR pipeline is to test the oldest and newest supported
# versions of Python. It's very rare for a failure to be specific to an
# intermediate version of Python, so we just catch those in the cron-job
# pipeline to reduce the amount of resources used.
main-tests-ubuntu:
if: github.repository_owner == 'Qiskit'
name: Main Tests (ubuntu-latest)
needs: [lint-docs, preliminary-tests]
strategy:
matrix:
python_version: ["3.13"]
uses: ./.github/workflows/test-linux.yml
with:
python-version: ${{ matrix.python_version }}
test-rust: false
test-images: false
install-from-sdist: true
install-optionals: false
main-tests-mac:
if: github.repository_owner == 'Qiskit'
name: Main Tests (macos)
needs: [lint-docs, preliminary-tests]
strategy:
matrix:
python_version: ["3.9", "3.13"]
uses: ./.github/workflows/test-mac.yml
with:
python-version: ${{ matrix.python_version }}
install-optionals: ${{ matrix.python_version == '3.9'}}
main-tests-windows:
if: github.repository_owner == 'Qiskit'
name: Main Tests (windows-latest)
needs: [lint-docs, preliminary-tests]
strategy:
matrix:
python_version: ["3.9", "3.13"]
uses: ./.github/workflows/test-windows.yml
with:
python-version: ${{ matrix.python_version }}
install-optionals: ${{ matrix.python_version == '3.9'}}