|
15 | 15 | WOKWI_CLI_TOKEN: ${{ secrets.WOKWI_CLI_TOKEN }}
|
16 | 16 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
17 | 17 |
|
18 |
| -concurrency: |
19 |
| - group: wokwi-${{github.event.pull_request.number || github.ref}} |
20 |
| - cancel-in-progress: true |
21 |
| - |
22 | 18 | jobs:
|
| 19 | + get_event_file: |
| 20 | + name: Get event file |
| 21 | + runs-on: ubuntu-latest |
| 22 | + outputs: |
| 23 | + ref: ${{ steps.get-ref.outputs.ref }} |
| 24 | + steps: |
| 25 | + - name: Download event file |
| 26 | + uses: actions/download-artifact@v4 |
| 27 | + with: |
| 28 | + run-id: ${{github.event.workflow_run.id}} |
| 29 | + github-token: ${{env.GITHUB_TOKEN}} |
| 30 | + name: Event File |
| 31 | + path: ${{github.event_path}} |
| 32 | + |
| 33 | + - name: Get ref |
| 34 | + id: get-ref |
| 35 | + run: | |
| 36 | + PR_NUMBER=$(jq -r '.number' ${{github.event_path}}/event.json) |
| 37 | + echo "PR_NUMBER = $PR_NUMBER" |
| 38 | + echo "ref=$PR_NUMBER" >> $GITHUB_OUTPUT |
| 39 | +
|
23 | 40 | gen_chunks:
|
24 | 41 | if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
|
25 | 42 | name: Generate Chunks matrix
|
26 | 43 | runs-on: ubuntu-latest
|
| 44 | + needs: get_event_file |
27 | 45 | outputs:
|
28 | 46 | chunks: ${{ steps.gen-chunks.outputs.chunks }}
|
| 47 | + concurrency: |
| 48 | + group: wokwi-${{ needs.get_event_file.outputs.ref || github.ref }} |
| 49 | + cancel-in-progress: true |
29 | 50 | steps:
|
30 | 51 | - name: Checkout Repository
|
31 | 52 | uses: actions/checkout@v4
|
|
47 | 68 | echo "chunks=${CHUNKS}" >>$GITHUB_OUTPUT
|
48 | 69 |
|
49 | 70 | wokwi-test:
|
50 |
| - needs: [gen_chunks] |
| 71 | + needs: gen_chunks |
51 | 72 | name: ${{matrix.chip}}-Wokwi_Test#${{matrix.chunks}}
|
52 | 73 | strategy:
|
53 | 74 | fail-fast: false
|
@@ -127,4 +148,4 @@ jobs:
|
127 | 148 | target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
|
128 | 149 | })).data;
|
129 | 150 | core.info(`${name} is ${state}`);
|
130 |
| - |
| 151 | +
|
0 commit comments