6060 CONTINUOUS_INTEGRATION: 1
6161 WORKSPACE: ${{ github.workspace }}
6262
63+ outputs:
64+ run_all_jobs: ${{ steps.check_extended_testing.outputs.run_all_jobs }}
65+
6366 steps:
6467 - name: Dump GitHub context
6568 env:
@@ -84,30 +87,20 @@ jobs:
8487 run: |
8588 TEST_JOBS=2 make -j2 test
8689
87- # use a dedicated job to check if full testsuite is enabled
88- # avoid starting VMs if not neeced
89- # and also provide the same check for all platforms
90- # the job fails when EXTENDED_TESTING is unset and run on fork repo
91- # note: secrets come from fork repositories
92-
93- check_extended_testing:
94- name: "Run EXTENDED_TESTING"
95- runs-on: ubuntu-latest
96-
97- steps:
98- # --------------------------------------------------------------------------------------------
99- # cannot use secrets earlier as part of 'if:' condition
100- - name: "Runs if EXTENDED_TESTING is set"
90+ # Set a variable for dependent jobs to signal if full testsuite is enabled
91+ - name: "Check if EXTENDED_TESTING is set"
92+ id: check_extended_testing
10193 env:
10294 EXTENDED_TESTING: ${{ secrets.EXTENDED_TESTING }}
10395 CURRENT_REPOSITORY: ${{ github.repository }}
10496 run: |
10597 if [[ -z "${EXTENDED_TESTING}" && "${CURRENT_REPOSITORY}" != 'Perl/perl5' ]]; then
106- echo "[Warning] Only run extended tests on 'Perl/perl5' PRs or when secrets.EXTENDED_TESTING is set. Stopping."
107- exit 78
98+ echo "Skipping extended test jobs."
99+ echo "::set-output name=run_all_jobs::false"
100+ else
101+ echo "Running all test jobs"
102+ echo "::set-output name=run_all_jobs::true"
108103 fi
109- - run: echo "Running EXTENDED_TESTING tests"
110- # --------------------------------------------------------------------------------------------
111104
112105 # _ _
113106 # | (_)_ _ _ ___ __
@@ -117,7 +110,8 @@ jobs:
117110 linux:
118111 runs-on: ubuntu-latest
119112 timeout-minutes: 120
120- needs: [sanity_check, check_extended_testing]
113+ needs: sanity_check
114+ if: needs.sanity_check.outputs.run_all_jobs == 'true'
121115
122116 env:
123117 PERL_SKIP_TTY_TEST: 1
@@ -161,7 +155,8 @@ jobs:
161155 name: "linux i386/ubuntu"
162156 runs-on: ubuntu-latest
163157 timeout-minutes: 120
164- needs: [sanity_check, check_extended_testing]
158+ needs: sanity_check
159+ if: needs.sanity_check.outputs.run_all_jobs == 'true'
165160
166161 # https://hub.docker.com/r/i386/ubuntu/
167162 container:
@@ -210,7 +205,8 @@ jobs:
210205 name: "macOS xcode 11"
211206 runs-on: macos-latest
212207 timeout-minutes: 120
213- needs: [sanity_check, check_extended_testing]
208+ needs: sanity_check
209+ if: needs.sanity_check.outputs.run_all_jobs == 'true'
214210
215211 env:
216212 PERL_SKIP_TTY_TEST: 1
@@ -240,7 +236,8 @@ jobs:
240236 name: "Windows msvc142"
241237 runs-on: windows-latest
242238 timeout-minutes: 120
243- needs: [sanity_check, check_extended_testing]
239+ needs: sanity_check
240+ if: needs.sanity_check.outputs.run_all_jobs == 'true'
244241
245242 env:
246243 PERL_SKIP_TTY_TEST: 1
@@ -291,7 +288,8 @@ jobs:
291288 name: "Windows msvc100"
292289 runs-on: windows-latest
293290 timeout-minutes: 120
294- needs: [sanity_check, check_extended_testing]
291+ needs: sanity_check
292+ if: needs.sanity_check.outputs.run_all_jobs == 'true'
295293
296294 env:
297295 PERL_SKIP_TTY_TEST: 1
@@ -328,7 +326,8 @@ jobs:
328326 name: "Windows mingw64"
329327 runs-on: windows-latest
330328 timeout-minutes: 120
331- needs: [sanity_check, check_extended_testing]
329+ needs: sanity_check
330+ if: needs.sanity_check.outputs.run_all_jobs == 'true'
332331
333332 env:
334333 PERL_SKIP_TTY_TEST: 1
@@ -366,7 +365,8 @@ jobs:
366365 name: "cygwin"
367366 runs-on: windows-latest
368367 timeout-minutes: 120
369- needs: [sanity_check, check_extended_testing]
368+ needs: sanity_check
369+ if: needs.sanity_check.outputs.run_all_jobs == 'true'
370370
371371 env:
372372 PERL_SKIP_TTY_TEST: 1
0 commit comments