.github/workflows/tf_testsuite.yml: only run on SELinuxProject/selinux
Stephen Smalley
maintainerPATCH 1/1 .github/workflows/tf_testsuite.yml: only run on SELinuxProject/selinux
Only try to run the testfarm tests on SELinuxProject/selinux; anything else will fail due to lacking access to the API key.
--- .github/workflows/tf_testsuite.yml | 1 + 1 file changed, 1 insertion(+)
.github/workflows/tf_testsuite.yml +1 -0
@@ -5,6 +5,7 @@ on: [push, pull_request] jobs: tf_testsuite: runs-on: ubuntu-latest + if: github.repository == 'SELinuxProject/selinux' strategy: fail-fast: false matrix:
Signature · 1 line
2.55.0
Quoted 22 lines · Stephen Smalley
Only try to run the testfarm tests on SELinuxProject/selinux; anything else will fail due to lacking access to the API key.
Signed-off-by Stephen Smalley <[email protected]>--- .github/workflows/tf_testsuite.yml | 1 + 1 file changed, 1 insertion(+).github/workflows/tf_testsuite.yml +1
-1@@ -5,6 +5,7 @@ on: [push, pull_request] jobs: tf_testsuite: runs-on: ubuntu-latest + if: github.repository == 'SELinuxProject/selinux' strategy: fail-fast: false matrix: --
Quoted 2 lines
2.55.0
IMHO this is overly restrictive - a contributor may have a TF token set up in their fork and this would prevent the test from running when they push a branch there (they would have to commit a revert of this patch and leave it out when submitting upstream). I think it's better to let it always try to run and suffer the failure when there's no token. We could disable it at least for pull requests, though, where sadly having a token set up in either repo doesn't help.
Signature · 3 lines
Ondrej Mosnacek Senior Software Engineer, Linux Security - SELinux kernel Red Hat, Inc.
Stephen Smalley
maintainerQuoted 28 lines · Ondrej Mosnacek
Quoted 22 lines · Stephen Smalley
Only try to run the testfarm tests on SELinuxProject/selinux; anything else will fail due to lacking access to the API key.
Signed-off-by Stephen Smalley <[email protected]>--- .github/workflows/tf_testsuite.yml | 1 + 1 file changed, 1 insertion(+).github/workflows/tf_testsuite.yml +1
-1@@ -5,6 +5,7 @@ on: [push, pull_request] jobs: tf_testsuite: runs-on: ubuntu-latest + if: github.repository == 'SELinuxProject/selinux' strategy: fail-fast: false matrix: --Quoted 2 lines
2.55.0
Quoted 7 lines
IMHO this is overly restrictive - a contributor may have a TF token set up in their fork and this would prevent the test from running when they push a branch there (they would have to commit a revert of this patch and leave it out when submitting upstream). I think it's better to let it always try to run and suffer the failure when there's no token. We could disable it at least for pull requests, though, where sadly having a token set up in either repo doesn't help.
Ok, I'll drop this patch then. I just find it annoying that every time I push a branch to my fork it tries to run these and fails and therefore doesn't get the nice green check mark overall even when everything else passes. I noticed that the CIFuzz workflow had this conditional and thought I'd replicate it for the testfarm one, but that's fine - I'll just live with it as is.