Skip to content

Commit 9af2a0a

Browse files
Update instance repo from cookiecutter template
1 parent f4a92bf commit 9af2a0a

2 files changed

Lines changed: 38 additions & 21 deletions

File tree

.cruft.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse",
3-
"commit": "e3507b3e60fea4b07e56fbf0a951de1fbe2c27ee",
3+
"commit": "7ce94457490c537272bffd96039f6362958dbf69",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {
@@ -36,7 +36,7 @@
3636
"trim_blocks": true
3737
},
3838
"_template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse",
39-
"_commit": "e3507b3e60fea4b07e56fbf0a951de1fbe2c27ee"
39+
"_commit": "7ce94457490c537272bffd96039f6362958dbf69"
4040
}
4141
},
4242
"directory": null

.github/workflows/test.yaml

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,46 @@ defaults:
1818
shell: bash -euo pipefail {0}
1919

2020
jobs:
21+
get-environments:
22+
runs-on: ubuntu-latest
23+
outputs:
24+
matrix: ${{ steps.get-envs.outputs.matrix }}
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
filter: blob:none
29+
fetch-depth: 0
30+
- name: Install uv
31+
uses: astral-sh/setup-uv@v5
32+
- name: Get test environments
33+
id: get-envs
34+
run: |
35+
MATRIX_JSON=$(uvx hatch env show --json | jq -c '[
36+
keys[]
37+
| select(startswith("hatch-test"))
38+
| . as $env
39+
| {
40+
env_name: $env,
41+
name: (if ($env | contains("pre")) then $env + " (PRE-RELEASE DEPENDENCIES)" else $env end)
42+
}
43+
]')
44+
echo "matrix=${MATRIX_JSON}" >> $GITHUB_OUTPUT
45+
2146
test:
47+
needs: get-environments
2248
runs-on: ${{ matrix.os }}
2349

2450
strategy:
2551
fail-fast: false
2652
matrix:
27-
include:
28-
- os: ubuntu-latest
29-
python: "3.10"
30-
- os: ubuntu-latest
31-
python: "3.12"
32-
- os: ubuntu-latest
33-
python: "3.12"
34-
pip-flags: "--pre"
35-
name: PRE-RELEASE DEPENDENCIES
36-
37-
name: ${{ matrix.name }} Python ${{ matrix.python }}
38-
39-
env:
40-
OS: ${{ matrix.os }}
41-
PYTHON: ${{ matrix.python }}
53+
os: [ubuntu-latest]
54+
include: ${{ fromJson(needs.get-environments.outputs.matrix) }}
55+
56+
name: ${{ matrix.name }}
4257

4358
steps:
4459
- uses: actions/checkout@v4
45-
with:
46-
filter: blob:none
47-
fetch-depth: 0
60+
4861
- name: Install uv
4962
uses: astral-sh/setup-uv@v5
5063
with:
@@ -54,8 +67,12 @@ jobs:
5467
MPLBACKEND: agg
5568
PLATFORM: ${{ matrix.os }}
5669
DISPLAY: :42
57-
run: uvx hatch test --cover --python ${{ matrix.python }}
70+
run: uvx hatch run ${{ matrix.env}}:test-cov
5871
- name: generate coverage report
5972
run: uvx hatch run hatch-test.py${{ matrix.python }}:coverage xml
6073
- name: Upload coverage
6174
uses: codecov/codecov-action@v4
75+
76+
77+
78+

0 commit comments

Comments
 (0)