@@ -85,23 +85,32 @@ jobs:
8585 test : ${{ fromJSON(needs.setup-integration-tests.outputs.test_names) }}
8686 runs-on : ubuntu-latest
8787 steps :
88+ # This step is needed to avoid running the integration tests if the secrets are not available.
89+ # TODO: remove this step once we have a way to run integration tests on forks.
90+ # https://github.com/Kong/kubernetes-testing-framework/issues/596
91+ - name : Detect if we should run (have required secrets)
92+ id : detect_if_should_run
93+ run : echo "result=${{ secrets.PULP_PASSWORD != '' }}" >> $GITHUB_OUTPUT
8894
8995 - name : checkout repository
9096 uses : actions/checkout@v3
9197 with :
9298 fetch-depth : 0
9399
94100 - uses : Kong/kong-license@master
101+ if : steps.detect_if_should_run.outputs.result == 'true'
95102 id : license
96103 with :
97104 password : ${{ secrets.PULP_PASSWORD }}
98105
99106 - name : setup golang
107+ if : steps.detect_if_should_run.outputs.result == 'true'
100108 uses : actions/setup-go@v4
101109 with :
102110 go-version : ' ^1.19'
103111
104112 - name : run integration test ${{ matrix.test }}
113+ if : steps.detect_if_should_run.outputs.result == 'true'
105114 run : make test.integration
106115 env :
107116 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -112,6 +121,7 @@ jobs:
112121 NCPU : 1
113122
114123 - name : Upload coverage to Codecov
124+ if : steps.detect_if_should_run.outputs.result == 'true'
115125 uses : codecov/codecov-action@v3
116126 with :
117127 token : ${{ secrets.CODECOV_TOKEN }}
@@ -132,6 +142,9 @@ jobs:
132142 environment : gcloud
133143 runs-on : ubuntu-latest
134144 steps :
145+ # This step is needed to avoid running the e2e tests if the secrets are not available.
146+ # TODO: remove this step once we have a way to run integration tests on forks.
147+ # https://github.com/Kong/kubernetes-testing-framework/issues/596
135148 - name : Detect if we should run (have required secrets)
136149 id : detect_if_should_run
137150 run : echo "result=${{ secrets.PULP_PASSWORD != '' && secrets.GOOGLE_APPLICATION_CREDENTIALS != '' }}" >> $GITHUB_OUTPUT
0 commit comments