Skip to content

Commit

Permalink
+5 - set up matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
SunSerega committed Aug 12, 2024
1 parent a961100 commit 4a2d5b8
Showing 1 changed file with 28 additions and 10 deletions.
38 changes: 28 additions & 10 deletions .github/workflows/upstream pretest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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$') {
Expand All @@ -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 "[email protected]"
$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 "[email protected]"
- name: checkout
uses: actions/checkout@main
with:
submodules: 'true'
token: ${{ secrets.PAT_TOKEN }}
# - name: checkout
# uses: actions/checkout@main
# with:
# token: ${{ secrets.PAT_TOKEN }}

0 comments on commit 4a2d5b8

Please sign in to comment.