|
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] |
| 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 | + - py39 |
| 37 | + - py311 |
| 38 | + - py314 |
31 | 39 | 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 | | - # Old builds are not available on osx-arm64 |
50 | | - # - os: macos |
51 | | - # python-version: '3.8' |
52 | | - # requirements: minimal |
53 | | - - os: windows |
54 | | - python-version: "3.8" |
55 | | - requirements: minimal |
56 | | - # Test without any optional dependencies |
57 | | - - os: ubuntu |
58 | | - python-version: "3.8" |
59 | | - requirements: no_optionals |
60 | | - - os: ubuntu |
61 | | - python-version: "3.13" |
62 | | - requirements: no_optionals |
63 | | - - os: macos |
64 | | - python-version: "3.8" |
65 | | - requirements: no_optionals |
66 | | - - os: macos |
67 | | - python-version: "3.13" |
68 | | - requirements: no_optionals |
69 | | - - os: windows |
70 | | - python-version: "3.8" |
71 | | - requirements: no_optionals |
72 | | - - os: windows |
73 | | - python-version: "3.13" |
74 | | - requirements: no_optionals |
75 | | - # Test on nightly builds of requirements |
76 | | - - os: ubuntu |
77 | | - python-version: "3.13" |
78 | | - requirements: upstream |
| 40 | + - os: ubuntu-latest |
| 41 | + environment: upstream |
| 42 | + - os: ubuntu-latest |
| 43 | + environment: nogil |
79 | 44 |
|
80 | 45 | steps: |
81 | 46 | - name: Checkout |
82 | 47 | uses: actions/checkout@v4 |
83 | | - with: |
84 | | - fetch-depth: 0 |
85 | | - |
86 | | - - name: Setup Conda Environment |
87 | | - uses: conda-incubator/setup-miniconda@v3 |
88 | | - with: |
89 | | - miniforge-version: latest |
90 | | - use-mamba: true |
91 | | - python-version: ${{ matrix.python-version }} |
92 | | - environment-file: ci/requirements-${{ matrix.requirements }}.yml |
93 | | - activate-environment: recursive_diff |
94 | 48 |
|
95 | | - - name: Install nightly builds |
96 | | - if: ${{ matrix.requirements == 'upstream' }} |
97 | | - run: | |
98 | | - mamba uninstall --force numpy pandas scipy pyarrow |
99 | | - python -m pip install --no-deps --pre --prefer-binary \ |
100 | | - --extra-index-url https://pypi.fury.io/arrow-nightlies/ \ |
101 | | - pyarrow |
102 | | - python -m pip install --no-deps --pre \ |
103 | | - -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ |
104 | | - numpy pandas scipy |
| 49 | + - name: Disregard pixi.lock (upstream only) |
| 50 | + if: matrix.environment == 'upstream' || matrix.environment == 'nogil' |
| 51 | + run: rm pixi.lock |
105 | 52 |
|
106 | | - - name: Show conda options |
107 | | - run: conda config --show |
108 | | - |
109 | | - - name: conda info |
110 | | - run: conda info |
| 53 | + - uses: prefix-dev/[email protected] |
| 54 | + with: |
| 55 | + pixi-version: v0.56.0 |
| 56 | + environments: ${{ matrix.environment }} |
| 57 | + cache: ${{ matrix.environment != 'upstream' && matrix.environment != 'nogil' }} |
| 58 | + locked: ${{ matrix.environment != 'upstream' && matrix.environment != 'nogil' }} |
111 | 59 |
|
112 | | - - name: conda list |
113 | | - run: conda list |
| 60 | + - name: Smoke test |
| 61 | + run: pixi run -e ${{ matrix.environment }} smoke-test |
114 | 62 |
|
115 | | - - name: Install |
116 | | - run: python -m pip install --no-deps -e . |
| 63 | + - name: pytest with coverage |
| 64 | + if: matrix.environment != 'nogil' && matrix.environment != 'smoke' |
| 65 | + run: pixi run -e ${{ matrix.environment }} coverage |
117 | 66 |
|
118 | | - - name: pytest |
119 | | - run: py.test --verbose --cov=recursive_diff --cov-report=xml |
| 67 | + - name: Free-threading stress test |
| 68 | + if: matrix.environment == 'nogil' |
| 69 | + run: pixi run -e nogil tests --parallel-threads=4 |
120 | 70 |
|
121 | 71 | - name: codecov.io |
122 | | - uses: codecov/codecov-action@v3 |
| 72 | + if: matrix.environment != 'nogil' && matrix.environment != 'smoke' |
| 73 | + uses: codecov/codecov-action@v5 |
0 commit comments