Skip to content

Commit 6ff7952

Browse files
committed
Add parallel testing demo
1 parent 6173a84 commit 6ff7952

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/parallel.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
outputs:
1414
TEST_MATRIX: "${{ steps.matrix.outputs.TEST_DIRS }}"
15+
FOO: "${{ steps.foo.outputs.FOO }}"
16+
BAR: "${{ steps.bar.outputs.BAR }}"
1517

1618
steps:
1719
- uses: actions/checkout@v4
@@ -33,6 +35,9 @@ jobs:
3335
sed -e '$d' collected.tmp | sed -e '$d' | tee collected.txt
3436
echo '::endgroup::'
3537
38+
- id: foo
39+
run: echo 'FOO=123' >> "${GITHUB_OUTPUT}"
40+
3641
- name: Generate matrix
3742
id: matrix
3843
shell: uv run -- python {0}
@@ -49,6 +54,9 @@ jobs:
4954
with open(environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as f:
5055
print(f"TEST_MATRIX={test_dirs}", file=f)
5156
57+
- id: bar
58+
run: echo 'BAR=456' >> "${GITHUB_OUTPUT}"
59+
5260
test:
5361
name: Test
5462
runs-on: ubuntu-latest
@@ -76,3 +84,6 @@ jobs:
7684
run: uv run -- pytest tests/test_basic.py
7785

7886
- run: echo "TEST_MATRIX is '${{ needs.collect.outputs.TEST_MATRIX }}'"
87+
88+
- run: echo "FOO is '${{ needs.collect.outputs.FOO }}'"
89+
- run: echo "BAR is '${{ needs.collect.outputs.BAR }}'"

0 commit comments

Comments
 (0)