Skip to content

Commit 16f4a1e

Browse files
committed
ci: update tests actions
1 parent 47697dc commit 16f4a1e

File tree

2 files changed

+42
-30
lines changed

2 files changed

+42
-30
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Fixes # (issue)
99
- [ ] This change requires a documentation update
1010

1111
## Checklist:
12+
- [ ] All pre-commits pass locally
1213
- [ ] I have performed a self-review of my code / this code was reviewed during pair work
1314
- [ ] I have made corresponding changes to the documentation
1415
- [ ] My changes generate no new warnings

.github/workflows/run_tests.yaml

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,50 @@ on:
44
pull_request:
55
branches:
66
- "main"
7-
- "dev*"
8-
- "**"
7+
- "dev"
98

109
jobs:
11-
test:
12-
runs-on: ${{ matrix.os }}
13-
defaults:
14-
run:
15-
shell: bash
16-
strategy:
17-
matrix:
18-
os: [ubuntu-latest]
19-
python-version: ["3.9", "3.10", "3.11", "3.12"]
10+
tests:
11+
name: python
12+
runs-on: ubuntu-latest
2013

2114
steps:
22-
- name: Checkout repository
23-
uses: actions/checkout@v3
24-
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v4
15+
- uses: actions/checkout@v4
16+
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v5
2619
with:
27-
python-version: ${{ matrix.python-version }}
28-
cache: "pip"
29-
- name: Update pip and install the package
30-
run: |
31-
python -m pip install --upgrade pip
32-
python -m pip install ".[test]"
20+
enable-cache: true
21+
cache-dependency-glob: "uv.lock"
22+
23+
- name: Install the project
24+
run: uv sync --all-extras --dev
25+
26+
- name: Run tests
27+
run: uv run pytest testsname: CI
28+
29+
on:
30+
pull_request:
31+
branches:
32+
- "main"
33+
- "dev"
34+
35+
jobs:
36+
tests:
37+
name: python
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Install uv
44+
uses: astral-sh/setup-uv@v5
45+
with:
46+
enable-cache: true
47+
cache-dependency-glob: "uv.lock"
48+
49+
- name: Install the project
50+
run: uv sync --all-extras --dev
51+
3352
- name: Run tests
34-
run: |
35-
pytest
36-
- name: Install and run linters
37-
run: |
38-
python -m pip install ".[lint]"
39-
python -m black .
40-
python -m ruff --fix .
41-
continue-on-error: true
42-
53+
run: uv run pytest tests

0 commit comments

Comments
 (0)