-
Notifications
You must be signed in to change notification settings - Fork 365
63 lines (58 loc) · 1.72 KB
/
ci-core.yml
File metadata and controls
63 lines (58 loc) · 1.72 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
# Continuous Integration for the core package
name: core
env:
UV_FROZEN: "1" # use lock file as is
UV_NO_EDITABLE: "1" # test the build package, not the dev installation
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
run-tests-and-coverage:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: ./.github/actions/setup-env
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: uv sync --all-extras
- name: Run twine check
run: uv build && uv run twine check dist/*
- name: Run tests
run: make core/tests
- name: "Save coverage artifact"
uses: actions/upload-artifact@v4
with:
name: "coverage-artifact-${{ matrix.python-version}}"
include-hidden-files: true
path: ".coverage.*"
retention-days: 1
- name: Run doctests
run: make core/doctests
coverage-compile:
needs: "run-tests-and-coverage"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: ./.github/actions/setup-env
- name: Install Python dependencies
run: uv sync --all-extras
- name: "Download coverage artifacts"
uses: actions/download-artifact@v4
with:
pattern: "coverage-artifact-*"
merge-multiple: true
- name: Compile coverage
run: make coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}