From 4a2d5b88c4bd109fa6a4a1ae36abd30018153925 Mon Sep 17 00:00:00 2001 From: Sun Serega Date: Mon, 12 Aug 2024 22:42:10 +0200 Subject: [PATCH] +5 - set up matrix --- .github/workflows/upstream pretest.yaml | 38 ++++++++++++++++++------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/.github/workflows/upstream pretest.yaml b/.github/workflows/upstream pretest.yaml index c4dc2a7a..a8248c21 100644 --- a/.github/workflows/upstream pretest.yaml +++ b/.github/workflows/upstream pretest.yaml @@ -10,8 +10,10 @@ permissions: contents: write jobs: - enmr-PRs: + enmr_PRs: runs-on: windows-latest + outputs: + exec_list: ${{ steps.make_exec_list.outputs.exec_list }} steps: - name: git config @@ -28,6 +30,7 @@ jobs: .gitmodules - name: make exec list + id: make_exec_list run: | foreach ($subm_key in git config --file .gitmodules --name-only --get-regexp '^submodule\..+\.url$') { @@ -42,25 +45,40 @@ jobs: $pr_num = $Matches[1] - Write-Host "- Found PR $pr_num" + #Write-Host "- Found PR $pr_num" + + $exec_list += "$pr_num;$subm_url" } } + + $json = $exec_list | ConvertTo-Json -Compress + Write-Host $json + echo "::set-output name=exec_list::$json" pretest-each: runs-on: windows-latest + needs: prepare_matrix + strategy: + fail-fast: false + matrix: + exec_node: ${{ fromJson(needs.enmr_PRs.outputs.exec_list) }} steps: - name: git config run: | - git config --global core.autocrlf false - git config --global user.name "sun pack bot" - git config --global user.email "sunserega2@gmail.com" + $exec_node = "${{ matrix.exec_node }}" + $pr_num, $subm_url = $exec_node -split ';', 2 + + Write-Host "Testing PR#$pr_num from: $subm_url" + + # git config --global core.autocrlf false + # git config --global user.name "sun pack bot" + # git config --global user.email "sunserega2@gmail.com" - - name: checkout - uses: actions/checkout@main - with: - submodules: 'true' - token: ${{ secrets.PAT_TOKEN }} + # - name: checkout + # uses: actions/checkout@main + # with: + # token: ${{ secrets.PAT_TOKEN }} \ No newline at end of file