-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (69 loc) Β· 2.04 KB
/
ci.yml
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
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: Unit tests
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
env:
- pl014
- pl015
- pl016
- pl017
- pl018
- pl019
- pl020
- py39
- py310
- py311
- py312
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659
with:
environments: ${{ matrix.env }}
- name: Install repository
run: |
pixi run -e ${{ matrix.env }} postinstall
- name: Run unittests
uses: pavelzw/pytest-action@510c5e90c360a185039bea56ce8b3e7e51a16507
with:
custom-pytest: pixi run -e ${{ matrix.env }} coverage
report-title: ${{ matrix.env }}
- name: Upload coverage reports to Codecov
if: matrix.env == 'py312'
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
pre-commit-checks:
# TODO: switch to pixi once there is a good way
name: pre-commit
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Run pre-commit
uses: quantco/pre-commit-conda@v1
lint-workflow-files:
name: Lint workflow files
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
# https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
- name: Check workflow files
run: ${{ steps.get_actionlint.outputs.executable }} -color