Skip to content

Commit 34f6647

Browse files
Merge pull request #986 from rackerlabs/enable-python-test
ci: enable running tests on all of our Python code
2 parents 0b824e8 + b313591 commit 34f6647

File tree

6 files changed

+577
-383
lines changed

6 files changed

+577
-383
lines changed

.github/workflows/code-test.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,25 @@ concurrency:
2020
group: ${{ github.workflow }}-${{ github.ref }}
2121

2222
jobs:
23+
discover:
24+
runs-on: ubuntu-latest
25+
outputs:
26+
projects: ${{ steps.set-projects.outputs.projects }}
27+
steps:
28+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
29+
- name: Find all Python projects with pyproject.toml
30+
id: set-projects
31+
run: |
32+
# grabs all paths with pyproject.toml, snips the 2nd dir, grabs only unique ones, makes a JSON list
33+
projects=$(find python -mindepth 2 -name pyproject.toml | awk -F/ '{print $2}' | sort -u | jq -R -s -c 'split("\n")[:-1]')
34+
echo "projects=$projects" >> "$GITHUB_OUTPUT"
2335
python:
36+
needs: [discover]
2437
runs-on: ubuntu-latest
2538

2639
strategy:
2740
matrix:
28-
project:
29-
- understack-workflows
30-
- understack-flavor-matcher
31-
- neutron-understack
41+
project: ${{ fromJson(needs.discover.outputs.projects) }}
3242

3343
defaults:
3444
run:

0 commit comments

Comments
 (0)