-
Notifications
You must be signed in to change notification settings - Fork 57
82 lines (70 loc) · 2.34 KB
/
Copy pathpackages.yml
File metadata and controls
82 lines (70 loc) · 2.34 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: "📦 Workspace packages"
# Stage 2 of ROADMAP.md (outcome 2): loop_common/loop_interpolation live under
# packages/ as independent uv-workspace members so the interpolation code is
# usable outside the LoopStructural framework. This job installs and tests
# them on their own, separately from the root LoopStructural test suite in
# tester.yml. loopstructural-test waits on packages-test (needs:) so the root
# suite only runs once loop_common/loop_interpolation are confirmed working.
on:
push:
branches:
- master
paths:
- 'packages/**'
- .github/workflows/packages.yml
pull_request:
branches:
- master
paths:
- 'packages/**'
- .github/workflows/packages.yml
workflow_dispatch:
permissions:
contents: read
jobs:
packages-test:
name: ${{ matrix.package }} (python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
package: [loop_common, loop_interpolation]
os: ${{ fromJSON(vars.BUILD_OS)}}
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}}
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install package with test extras
run: |
uv sync --package ${{ matrix.package }} --extra tests --python ${{ matrix.python-version }}
- name: pytest
run: |
uv run pytest packages/${{ matrix.package }}/tests
loopstructural-test:
name: LoopStructural (python ${{ matrix.python-version }})
needs: packages-test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ${{ fromJSON(vars.BUILD_OS)}}
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}}
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install package with test extras
run: |
uv sync --extra tests --python ${{ matrix.python-version }}
- name: pytest
run: |
uv run pytest tests