Skip to content

Commit 9d6d022

Browse files
committed
Add test action.
1 parent 0ebcdf7 commit 9d6d022

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/test.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Tests
2+
on:
3+
workflow_call:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- ".github/workflows/test.yml"
10+
- "src/re_plugin_pack/**"
11+
- "tests/**"
12+
- "pyproject.toml"
13+
pull_request:
14+
paths:
15+
- ".github/workflows/test.yml"
16+
- "src/re_plugin_pack/**"
17+
- "tests/**"
18+
- "pyproject.toml"
19+
jobs:
20+
lint-and-format:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v5
26+
- name: Run Ruff
27+
run: uv run ruff check . --output-format=github
28+
- name: Ruff format
29+
run: uv run ruff format . --check
30+
test-against-python-matrix:
31+
runs-on: ubuntu-latest
32+
strategy:
33+
matrix:
34+
python-version: ["3.10", "3.11", "3.12", "3.13"]
35+
fail-fast: true
36+
steps:
37+
- uses: actions/checkout@v4
38+
- name: Install uv
39+
uses: astral-sh/setup-uv@v5
40+
- name: Run tests
41+
run: |
42+
uv run -p ${{ matrix.python-version }} pytest

0 commit comments

Comments
 (0)