forked from amperser/proselint
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (53 loc) · 1.56 KB
/
ci-lint-test.yml
File metadata and controls
53 lines (53 loc) · 1.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
name: "CI: Lint & Test"
on: [push, pull_request]
jobs:
lint:
name: Lint
if: "!(contains(github.event.head_commit.message, '[skip_ci]'))"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: "[INIT] Checkout repository"
uses: actions/checkout@v4
- name: "[INIT] Install uv"
uses: astral-sh/setup-uv@v5
with:
python-version: "3.10"
enable-cache: true
- name: "[INIT] Install dependencies"
run: uv sync --locked --all-extras --dev
- name: "[EXEC] Lint"
run: uv run poe lint
test-cover:
name: Test & Cover
if: "!(contains(github.event.head_commit.message, '[skip_ci]'))"
runs-on: ${{ matrix.os }}
permissions:
id-token: write
defaults:
run:
shell: bash
strategy:
matrix:
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: "[INIT] Checkout repository"
uses: actions/checkout@v4
- name: "[INIT] Install uv"
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python }}
enable-cache: true
- name: "[INIT] Install dependencies"
run: uv sync --locked --all-extras --dev --group test
- name: "[EXEC] Test"
run: uv run poe test-cover
- name: "[EXEC] Upload coverage to Codecov"
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
flags: ${{ matrix.os }},py${{ matrix.python }}
use_oidc: true