-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (66 loc) · 2.07 KB
/
ci.yml
File metadata and controls
69 lines (66 loc) · 2.07 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
name: CI
on: [push]
# Automatically stop old builds on the same branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Pre-commit Checks
timeout-minutes: 30
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Check out branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# needed for 'pre-commit-mirrors-insert-license'
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
environments: default lint
- name: Install repository
run: pixi run -e default postinstall
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure
- name: Upload coverage
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
unit-tests:
name: pytest
timeout-minutes: 30
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: read
strategy:
fail-fast: false
matrix:
environment:
- py311
- py312
- py313
- py314
- no-optional-dependencies
os:
- ubuntu-latest
- windows-latest
steps:
- name: Check out branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up pixi
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
environments: ${{ matrix.environment }}
- name: Install repository
run: pixi run -e ${{ matrix.environment }} postinstall
- name: Run pytest
run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes
- name: Upload coverage
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}