-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (48 loc) · 1.38 KB
/
ci.yml
File metadata and controls
61 lines (48 loc) · 1.38 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
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Spell check
uses: crate-ci/typos@v1
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
pyproject.toml
uv.lock
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.9"
- name: Sync environment
run: uv sync --frozen --extra dev
- name: Ruff
run: uv run ruff check .
- name: Ruff format (check)
run: uv run ruff format --check .
- name: Mypy
run: uv run mypy noisecutter/
- name: Pytest with coverage
run: uv run pytest tests/ --cov=noisecutter --cov-report=term-missing
- name: Audit locked runtime dependencies
run: |
uv export --frozen --no-dev --no-hashes --no-emit-project -o /tmp/requirements-audit.txt
uvx pip-audit==2.7.3 -r /tmp/requirements-audit.txt --strict