-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.34 KB
/
ci.yaml
File metadata and controls
52 lines (42 loc) · 1.34 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
name: CI
on:
pull_request:
push:
branches: [main]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: 🟨 Set up Pixi
uses: prefix-dev/setup-pixi@v0.9.2
with:
environments: lint
- name: 🧹 Execute lint
run: pixi run -e lint lint
checks:
name: Test 🐍 ${{ matrix.environment }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
environment: [test-py310, test-py313]
runs-on: ${{ matrix.os }}
steps:
- name: check out repo
uses: actions/checkout@v5
- name: 🟨 Set up Pixi
uses: prefix-dev/setup-pixi@v0.9.2
with:
environments: ${{ matrix.environment }}
- name: 🧪 Execute pytest
env:
pytest_github_report: true
run: pixi run -e ${{ matrix.environment }} test --cov-report xml
- name: 📦 Disambiguate coverage filename by environment and OS
run: mv .coverage ".coverage.${{ matrix.environment }}.${{ matrix.os }}.xml"
- name: 📤 Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}