summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorBram <perl-rt@wizbit.be>2022-09-15 21:26:14 +0200
committerKarl Williamson <khw@cpan.org>2022-10-12 16:49:07 -0600
commit56ce4b65223e5c23d7d5db3104d094f3f058e062 (patch)
treeb7ba09bf44709f20906acbbe6e7649b2e7d541a7 /.github
parentb564de6cbcc5bf778b0cd8667a725000c9a02d72 (diff)
downloadperl-56ce4b65223e5c23d7d5db3104d094f3f058e062.tar.gz
testsuite.yml: Check for false value
Extend the 'EXTENDED_TESTING' check to differentiate between a true and a false value. With the original check: setting 'EXTENDED_TESTING' to 0 would cause all jobs to be run which is not very logical. The only way to disable it is/was to completely remove the 'EXTENDED_TESTING' secret. With this commit it can be disabled by setting 'EXTENDED_TESTING' to '0' (or '00000000' or ' ' or ' 0 0 0000 00 ' or ...)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/testsuite.yml21
1 files changed, 18 insertions, 3 deletions
diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml
index cc61d59bba..26ab5c4958 100644
--- a/.github/workflows/testsuite.yml
+++ b/.github/workflows/testsuite.yml
@@ -10,8 +10,23 @@
#
# Testing other build configurations is controlled by the 'Secrets' configured
# in 'Settings' -> 'Secrets' -> 'Actions' -> 'Repository Secrets':
-# - EXTENDED_TESTING: when this secret exists (value is irrelevant) then all
-# build configurations are tested;
+# - EXTENDED_TESTING: when this secret exists and is set to a true value then
+# all build configurations are tested;
+#
+# For the purpose of this workflow:
+# - 'true value': any value that is not false
+# - 'false value':
+# * empty string
+# * string containing only spaces (i.e. ' ')
+# * string containing only zeroes (i.e. '0', '0000')
+# * string containing only spaces and zeroes (i.e. '0 0 0 0')
+#
+# When setting a value it's best to set a long and complex value
+# since GitHub will mask the secrets in the output. Which means if you
+# set (for example) EXTENDED_TESTING to 1 then all occurrences of '1'
+# are replaced with '*'. (e.g. `s/1/*/g;`). So it's recommended to set
+# something that is unlikely to occur in the job(/build/test) output
+# (for example: '111111111111111111', 'Rumpelstiltskin', ...).
#
name: testsuite
@@ -142,7 +157,7 @@ jobs:
if [[ "${CURRENT_REPOSITORY}" = 'Perl/perl5' ]]; then
echo "Running all test jobs"
echo "::set-output name=run_all_jobs::true"
- elif [[ -n "${EXTENDED_TESTING}" ]]; then
+ elif [[ -n "${EXTENDED_TESTING}" ]] && [[ "${EXTENDED_TESTING%[!0 ]*}" != "${EXTENDED_TESTING}" ]]; then
echo "Running all test jobs"
echo "::set-output name=run_all_jobs::true"
else