-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (46 loc) · 1.51 KB
/
ci.yaml
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
name: CI
on:
pull_request:
push:
branches: [main]
tags: ['v*']
jobs:
mypy:
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
pixi-environments: "all-dev"
- name: mypy
run: MYPYPATH=stubs pixi run --frozen -e all-dev mypy src
# Can add non-regression tests in here somewhere too if needed.
# Run those even if the pull request is a draft.
tests-regression:
if: ${{ !github.event.pull_request.draft }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
python-version: [ "3.11" ]
runs-on: "${{ matrix.os }}"
steps:
- name: Check out repository
uses: actions/checkout@v3
- uses: ./.github/actions/setup
with:
pixi-environments: "tests"
- name: Run regression tests relevant for coverage
run: |
pixi run -e tests python scripts/write-config.py
pixi run -e tests pytest -s -r a -v src tests --doctest-modules -m "not coverage_breaker" --cov=src --cov-report=term-missing --cov-report=xml
pixi run -e tests coverage report
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run tests that break coverage
run: |
pixi run -e tests pytest -s -r a -v tests -m coverage_breaker