-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (65 loc) · 1.89 KB
/
Copy pathpytest.yml
File metadata and controls
76 lines (65 loc) · 1.89 KB
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
name: Test
on:
push:
branches: [main]
pull_request:
branches: ["*"]
workflow_dispatch: # allows you to trigger manually
# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: pytest-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
test:
name: ${{ matrix.os }} ${{ matrix.environment }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest # x86-64
- ubuntu-24.04-arm # ARM
- macos-15-intel # x86-64
- macos-latest # ARM
- windows-latest # x86-64
environment:
- smoke
- mindeps
- xarray2024-5
- no-dask
- no-optional
- py39
- py311
- py314
include:
- os: ubuntu-latest
environment: upstream
- os: ubuntu-latest
environment: nogil
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Disregard pixi.lock (upstream only)
if: matrix.environment == 'upstream'
run: rm pixi.lock
- uses: prefix-dev/setup-pixi@v0
with:
pixi-version: v0.65.0
environments: ${{ matrix.environment }}
cache: ${{ matrix.environment != 'upstream' }}
locked: ${{ matrix.environment != 'upstream' }}
- name: Smoke test
run: pixi run -e ${{ matrix.environment }} smoke-test
- name: pytest with coverage
if: matrix.environment != 'smoke'
run: pixi run -e ${{ matrix.environment }} coverage
- name: Free-threading stress test
if: matrix.environment == 'nogil'
run: pixi run -e nogil tests --parallel-threads=4
- name: codecov.io
if: matrix.environment != 'smoke'
uses: codecov/codecov-action@v5