Skip to content

Commit 5b216f1

Browse files
committed
test all make_asset scripts in CI
1 parent 56ba5f1 commit 5b216f1

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,39 @@ jobs:
1919
os: ${{ matrix.os }}
2020
python-version: "3.10"
2121
secrets: inherit
22+
23+
find-scripts:
24+
runs-on: ubuntu-latest
25+
outputs:
26+
script_list: ${{ steps.set-matrix.outputs.script_list }}
27+
steps:
28+
- name: Check out repository
29+
uses: actions/checkout@v4
30+
31+
- name: Find Python scripts
32+
id: set-matrix
33+
run: |
34+
SCRIPTS=$(find examples/make_assets -name "*.py" | jq -R -s -c 'split("\n")[:-1]')
35+
echo "script_list=$SCRIPTS" >> $GITHUB_OUTPUT
36+
37+
test-scripts:
38+
needs: find-scripts
39+
runs-on: ubuntu-latest
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
script: ${{fromJson(needs.find-scripts.outputs.script_list)}}
44+
steps:
45+
- name: Check out repository
46+
uses: actions/checkout@v4
47+
48+
- name: Set up Python
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: "3.10"
52+
53+
- name: Install package and dependencies
54+
run: pip install -e .
55+
56+
- name: Run script
57+
run: python ${{ matrix.script }}

0 commit comments

Comments
 (0)