Skip to content

Commit ebb0dac

Browse files
committed
[CI]: Run script tests when scripts change
Add a workflow that runs pytest tests/scripts on pushes and pull requests that touch scripts/, tests/scripts/, or the workflow file.
1 parent 02eff4b commit ebb0dac

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/scripts.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Scripts
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "scripts/**"
8+
- "tests/scripts/**"
9+
- ".github/workflows/scripts.yml"
10+
pull_request:
11+
branches: [main]
12+
paths:
13+
- "scripts/**"
14+
- "tests/scripts/**"
15+
- ".github/workflows/scripts.yml"
16+
17+
concurrency:
18+
group: scripts-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
permissions: {}
22+
23+
jobs:
24+
test:
25+
name: Test scripts
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 10
28+
permissions:
29+
contents: read
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
33+
with:
34+
persist-credentials: false
35+
36+
- name: Set up Python
37+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
38+
with:
39+
python-version: "3.12"
40+
41+
- name: Set up uv
42+
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
43+
with:
44+
enable-cache: true
45+
46+
- name: Install dependencies
47+
run: uv sync --all-extras --frozen
48+
49+
- name: Run script tests
50+
run: uv run pytest tests/scripts

0 commit comments

Comments
 (0)