-
Notifications
You must be signed in to change notification settings - Fork 2.4k
54 lines (53 loc) · 1.87 KB
/
tests.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
---
name: Tests
on:
push:
branches: [ main, 'stable/*' ]
pull_request:
branches: [ main, 'stable/*' ]
merge_group:
concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
tests:
if: github.repository_owner == 'Qiskit'
name: macOS-arm64-tests-Python-${{ matrix.python-version }}
runs-on: macOS-14
strategy:
fail-fast: false
matrix:
# Normally we test min and max version but we can't run python 3.8 or
# 3.9 on arm64 until actions/setup-python#808 is resolved
python-version: ["3.10", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.70
if: matrix.python-version == '3.10'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: arm64
- name: 'Install dependencies'
run: |
python -m pip install -U -r requirements.txt -c constraints.txt
python -m pip install -U -r requirements-dev.txt -c constraints.txt
python -m pip install -c constraints.txt -e .
if: matrix.python-version == '3.10'
env:
QISKIT_NO_CACHE_GATES: 1
- name: 'Install dependencies'
run: |
python -m pip install -U -r requirements.txt -c constraints.txt
python -m pip install -U -r requirements-dev.txt -c constraints.txt
python -m pip install -c constraints.txt -e .
if: matrix.python-version == '3.12'
- name: 'Install optionals'
run: |
python -m pip install -r requirements-optional.txt -c constraints.txt
python tools/report_numpy_state.py
if: matrix.python-version == '3.10'
- name: 'Run tests'
run: stestr run