-
Notifications
You must be signed in to change notification settings - Fork 39
75 lines (59 loc) · 1.76 KB
/
Copy pathci.yaml
File metadata and controls
75 lines (59 loc) · 1.76 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
70
71
72
73
74
75
name: CI
permissions:
contents: read
pull-requests: write
on:
pull_request:
push:
branches: [main]
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} - ci-pipeline"
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: "3.12"
# Private Git deps (optional; remove if not needed)
- name: Configure Git credentials for private deps
if: env.GH_READ_TOKEN != ''
env:
GH_READ_TOKEN: ${{ secrets.GH_READ_TOKEN }}
run: |
git config --global url."https://${GH_READ_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"
- name: Install Python
run: uv python install
- name: Sync deps
run: uv sync
- name: Lint
run: |
uv run ruff check
uv run ruff format --check
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: "3.12"
- name: Configure Git credentials for private deps
if: env.GH_READ_TOKEN != ''
env:
GH_READ_TOKEN: ${{ secrets.GH_READ_TOKEN }}
run: |
git config --global url."https://${GH_READ_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"
- name: Install Python
run: uv python install
- name: Sync deps
run: uv sync
- name: Test
run: uv run pytest -v -m "not integration"