|
| 1 | +name: "📦 Workspace packages" |
| 2 | + |
| 3 | +# Stage 2 of ROADMAP.md (outcome 2): loop_common/loop_interpolation live under |
| 4 | +# packages/ as independent uv-workspace members so the interpolation code is |
| 5 | +# usable outside the LoopStructural framework. This job installs and tests |
| 6 | +# them on their own, separately from the root LoopStructural test suite in |
| 7 | +# tester.yml. loopstructural-test waits on packages-test (needs:) so the root |
| 8 | +# suite only runs once loop_common/loop_interpolation are confirmed working. |
| 9 | + |
| 10 | +on: |
| 11 | + push: |
| 12 | + branches: |
| 13 | + - master |
| 14 | + paths: |
| 15 | + - 'packages/**' |
| 16 | + - .github/workflows/packages.yml |
| 17 | + pull_request: |
| 18 | + branches: |
| 19 | + - master |
| 20 | + paths: |
| 21 | + - 'packages/**' |
| 22 | + - .github/workflows/packages.yml |
| 23 | + workflow_dispatch: |
| 24 | + |
| 25 | +permissions: |
| 26 | + contents: read |
| 27 | + |
| 28 | +jobs: |
| 29 | + packages-test: |
| 30 | + name: ${{ matrix.package }} (python ${{ matrix.python-version }}) |
| 31 | + runs-on: ${{ matrix.os }} |
| 32 | + strategy: |
| 33 | + fail-fast: false |
| 34 | + matrix: |
| 35 | + package: [loop_common, loop_interpolation] |
| 36 | + os: ${{ fromJSON(vars.BUILD_OS)}} |
| 37 | + python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}} |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v4 |
| 40 | + |
| 41 | + - name: Set up uv |
| 42 | + uses: astral-sh/setup-uv@v3 |
| 43 | + with: |
| 44 | + version: "latest" |
| 45 | + |
| 46 | + - name: Set up Python ${{ matrix.python-version }} |
| 47 | + run: uv python install ${{ matrix.python-version }} |
| 48 | + |
| 49 | + - name: Install package with test extras |
| 50 | + run: | |
| 51 | + uv sync --package ${{ matrix.package }} --extra tests --python ${{ matrix.python-version }} |
| 52 | +
|
| 53 | + - name: pytest |
| 54 | + run: | |
| 55 | + uv run pytest packages/${{ matrix.package }}/tests |
| 56 | + loopstructural-test: |
| 57 | + name: LoopStructural (python ${{ matrix.python-version }}) |
| 58 | + needs: packages-test |
| 59 | + runs-on: ${{ matrix.os }} |
| 60 | + strategy: |
| 61 | + fail-fast: false |
| 62 | + matrix: |
| 63 | + os: ${{ fromJSON(vars.BUILD_OS)}} |
| 64 | + python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}} |
| 65 | + steps: |
| 66 | + - uses: actions/checkout@v4 |
| 67 | + |
| 68 | + - name: Set up uv |
| 69 | + uses: astral-sh/setup-uv@v3 |
| 70 | + with: |
| 71 | + version: "latest" |
| 72 | + |
| 73 | + - name: Set up Python ${{ matrix.python-version }} |
| 74 | + run: uv python install ${{ matrix.python-version }} |
| 75 | + |
| 76 | + - name: Install package with test extras |
| 77 | + run: | |
| 78 | + uv sync --extra tests --python ${{ matrix.python-version }} |
| 79 | +
|
| 80 | + - name: pytest |
| 81 | + run: | |
| 82 | + uv run pytest tests |
0 commit comments