Skip to content

Commit 0a9732d

Browse files
committed
Split CI workflow into three separate workflows
1 parent 69e73ff commit 0a9732d

File tree

5 files changed

+106
-49
lines changed

5 files changed

+106
-49
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.ref }}-${{ github.head_ref }}-internal-examples
11+
cancel-in-progress: true
12+
13+
jobs:
14+
internal-examples:
15+
name: internal examples
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
20+
steps:
21+
- uses: actions/checkout@v6
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install ".[test]"
30+
- name: Run internal examples
31+
run: |
32+
python examples/fodo.py

.github/workflows/tests.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/unit_tests.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.ref }}-${{ github.head_ref }}-unit-tests
11+
cancel-in-progress: true
12+
13+
jobs:
14+
unit-tests:
15+
name: unit tests
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
20+
steps:
21+
- uses: actions/checkout@v6
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install ".[test]"
30+
- name: Run unit tests
31+
run: |
32+
pytest tests -v
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.ref }}-${{ github.head_ref }}-upstream-examples
11+
cancel-in-progress: true
12+
13+
jobs:
14+
upstream-examples:
15+
name: upstream examples
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
20+
steps:
21+
- uses: actions/checkout@v6
22+
- name: Checkout upstream PALS repo
23+
uses: actions/checkout@v6
24+
with:
25+
repository: pals-project/pals
26+
path: pals_temp
27+
fetch-depth: 1
28+
sparse-checkout: |
29+
examples/
30+
- name: Set up Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
- name: Install
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install ".[test]"
38+
- name: Run upstream examples
39+
run: |
40+
for file in pals_temp/examples/*.pals.yaml; do
41+
python test_upstream_examples.py --path "${file}"
42+
done

0 commit comments

Comments
 (0)