Refs/heads/move to gh #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# 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'}} |