|
10 | 10 | # When this workflow is queued, automatically cancel any previous running |
11 | 11 | # or pending jobs from the same branch |
12 | 12 | concurrency: |
13 | | - group: tests-${{ github.ref }} |
| 13 | + group: pytest-${{ github.ref }} |
14 | 14 | cancel-in-progress: true |
15 | 15 |
|
16 | 16 | defaults: |
17 | 17 | run: |
18 | 18 | shell: bash -l {0} |
19 | 19 |
|
20 | 20 | jobs: |
21 | | - build: |
22 | | - name: |
23 | | - ${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.requirements }} |
24 | | - runs-on: ${{ matrix.os }}-latest |
| 21 | + test: |
| 22 | + name: ${{ matrix.os }} ${{ matrix.environment }} |
| 23 | + runs-on: ${{ matrix.os }} |
25 | 24 | strategy: |
26 | 25 | fail-fast: false |
27 | 26 | matrix: |
28 | | - os: [ubuntu] |
29 | | - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] |
30 | | - requirements: [latest] |
31 | | - include: |
32 | | - # Test on macos and windows (first and last version of python only) |
33 | | - - os: macos |
34 | | - python-version: "3.8" |
35 | | - requirements: latest |
36 | | - - os: macos |
37 | | - python-version: "3.13" |
38 | | - requirements: latest |
39 | | - - os: windows |
40 | | - python-version: "3.8" |
41 | | - requirements: latest |
42 | | - - os: windows |
43 | | - python-version: "3.13" |
44 | | - requirements: latest |
45 | | - # Test on minimal requirements |
46 | | - - os: ubuntu |
47 | | - python-version: "3.8" |
48 | | - requirements: minimal |
49 | | - - os: macos |
50 | | - python-version: "3.8" |
51 | | - requirements: minimal |
52 | | - - os: windows |
53 | | - python-version: "3.8" |
54 | | - requirements: minimal |
| 27 | + os: |
| 28 | + - ubuntu-latest # x86-64 |
| 29 | + - ubuntu-24.04-arm # ARM |
| 30 | + - macos-15-intel # x86-64 |
| 31 | + - macos-latest # ARM |
| 32 | + - windows-latest # x86-64 |
| 33 | + environment: |
| 34 | + - smoke |
| 35 | + - mindeps |
| 36 | + - py310 |
| 37 | + - py314 |
| 38 | + # include: |
| 39 | + # - os: ubuntu-latest |
| 40 | + # environment: nogil |
55 | 41 |
|
56 | 42 | steps: |
57 | 43 | - name: Checkout |
58 | | - uses: actions/checkout@v4 |
59 | | - with: |
60 | | - fetch-depth: 0 |
| 44 | + uses: actions/checkout@v6 |
61 | 45 |
|
62 | | - - name: Setup Conda Environment |
63 | | - uses: conda-incubator/setup-miniconda@v3 |
| 46 | + - uses: prefix-dev/setup-pixi@v0 |
64 | 47 | with: |
65 | | - miniforge-version: latest |
66 | | - use-mamba: true |
67 | | - python-version: ${{ matrix.python-version }} |
68 | | - environment-file: ci/requirements-${{ matrix.requirements }}.yml |
69 | | - activate-environment: pshell |
70 | | - |
71 | | - - name: Show conda options |
72 | | - run: conda config --show |
73 | | - |
74 | | - - name: conda info |
75 | | - run: conda info |
| 48 | + pixi-version: v0.62.1 |
| 49 | + environments: ${{ matrix.environment }} |
| 50 | + cache: true |
| 51 | + locked: true |
76 | 52 |
|
77 | | - - name: conda list |
78 | | - run: conda list |
| 53 | + - name: Smoke test |
| 54 | + run: pixi run -e ${{ matrix.environment }} smoke-test |
79 | 55 |
|
80 | | - - name: Install |
81 | | - run: python -m pip install --no-deps -e . |
| 56 | + - name: pytest with coverage |
| 57 | + if: matrix.environment != 'smoke' |
| 58 | + run: pixi run -e ${{ matrix.environment }} coverage |
82 | 59 |
|
83 | | - - name: pytest |
84 | | - run: py.test --verbose --cov=pshell --cov-report=xml |
| 60 | + # - name: Free-threading stress test |
| 61 | + # if: matrix.environment == 'nogil' |
| 62 | + # run: pixi run -e nogil tests --parallel-threads=4 |
85 | 63 |
|
86 | 64 | - name: codecov.io |
87 | | - uses: codecov/codecov-action@v3 |
| 65 | + if: matrix.environment != 'smoke' |
| 66 | + uses: codecov/codecov-action@v5 |
0 commit comments