Repository navigation
65 lines (63 loc) · 2.56 KB
/
Copy pathci.yml
File metadata and controls
65 lines (63 loc) · 2.56 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
---
name: ci
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
lint-commits:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version-file: "pyproject.toml"
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
- name: Install gitlint
# keep in sync with pyproject.toml and .pre-commit-config.yaml
run: uv tool install gitlint-core==0.19.1
- name: Check commit messages
# .gitlint keeps the ignore-fixup defaults so `git commit --fixup` passes the
# commit-msg hook; only this range check disables them.
run: |-
gitlint --commits origin/${{ github.base_ref }}..HEAD \
-c general.ignore-fixup-commits=false \
-c general.ignore-squash-commits=false \
-c general.ignore-fixup-amend-commits=false
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version-file: "pyproject.toml"
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
with:
enable-cache: true
- name: Setup enviroment
run: uv sync --locked
- name: Run tests + cov report
run: uv run make ISOLATE=0 test-with-coverage
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
integration-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version-file: "pyproject.toml"
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
with:
enable-cache: true
- name: Setup enviroment
run: uv sync --locked
- name: Run Integration Tests
run: |
curl --retry 3 -sS -o /usr/local/bin/retry https://raw.githubusercontent.com/okurz/retry/refs/heads/main/retry
chmod +x /usr/local/bin/retry
uv run make ISOLATE=0 test-integration