forked from pals-project/pals-python
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.27 KB
/
tests.yml
File metadata and controls
49 lines (46 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: pals
on:
push:
branches:
- "main"
pull_request:
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-pals-python
cancel-in-progress: true
jobs:
tests:
name: tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
python -m pip install --upgrade pip
pip install ".[test]"
- name: Test
run: |
pytest tests -v
- name: Examples (internal)
run: |
python examples/fodo.py
- name: Examples (external)
run: |
# Copy examples directory from the main PALS repository
cd examples
git clone --no-checkout https://github.com/pals-project/pals.git pals_temp
cd pals_temp
git sparse-checkout init
git sparse-checkout set examples/
git checkout main
# Test all external examples
cd -
for file in pals_temp/examples/*.pals.yaml; do
python test_external_examples.py --path "${file}"
done