-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (50 loc) · 1.58 KB
/
Copy pathci.yml
File metadata and controls
61 lines (50 loc) · 1.58 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:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: test (py${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install package (dev extras)
run: pip install -e ".[dev]"
- name: Lint (ruff)
run: ruff check src/ tests/ examples/
- name: Format check (black)
run: black --check src/ tests/ examples/
- name: Type check (mypy)
run: mypy src/codefix_env/ --ignore-missing-imports
continue-on-error: true # tighten to required once codebase is fully typed
- name: Run tests with coverage
run: |
PYTHONPATH=src pytest tests/ -v --timeout=60 \
--cov=src/codefix_env --cov-report=xml --cov-report=term
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage-py${{ matrix.python-version }}
path: coverage.xml
cli-smoke-test:
name: verify console script actually works
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install -e .
- name: Confirm codefix-server entry point resolves
run: codefix-server info