Skip to content

Commit 85ce696

Browse files
committed
chore: update action
1 parent e5883f4 commit 85ce696

1 file changed

Lines changed: 21 additions & 13 deletions

File tree

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,40 @@
1-
name: lint
1+
name: test
22

33
on:
44
push:
55
branches: [main]
66
paths:
7+
- "**.py"
78
- "**.pyi"
8-
- ".github/workflows/lint.yaml"
9+
- ".github/workflows/test.yaml"
910
- "pyproject.toml"
1011
- "ruff.toml"
1112
- "pyrightconfig.json"
12-
- ".pre-commit-config.yaml"
1313
pull_request:
1414
branches: [main]
1515

1616
jobs:
17-
lint:
17+
test:
1818
runs-on: ubuntu-latest
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
task:
23+
- name: lint
24+
cmd: uv run poe lint
25+
- name: mypy
26+
cmd: uv run poe mypy
27+
- name: pyright
28+
cmd: uv run poe pyright
29+
- name: pytest
30+
cmd: uv run pytest src/tests/ -v
31+
1932
env:
2033
PYTHON_VERSION: "3.11"
2134
UV_CACHE_DIR: /tmp/.uv-cache
2235

36+
name: ${{ matrix.task.name }}
37+
2338
steps:
2439
- uses: actions/checkout@v6
2540

@@ -50,15 +65,8 @@ jobs:
5065
if: steps.uv-cache.outputs.cache-hit != 'true'
5166
run: uv sync
5267

53-
- name: Restore prek cache
54-
uses: actions/cache@v5
55-
with:
56-
path: ~/.cache/prek
57-
key: prek-${{ steps.setup-python.outputs.PY }}-${{ hashFiles('.pre-commit-config.yaml') }}
58-
59-
- name: Code checks
60-
run: |
61-
uv run prek run --all-files --show-diff-on-failure
68+
- name: Run ${{ matrix.task.name }}
69+
run: ${{ matrix.task.cmd }}
6270

6371
- name: Minimize uv cache
6472
run: uv cache prune --ci

0 commit comments

Comments
 (0)