Skip to content

Commit a4eb66d

Browse files
authored
PECOBLR-2023 Skip assembly jar packaging tests on fork PRs due to missing secrets (#1252)
The "Check Uber Jar Packaging" and "Check Thin Jar Packaging" steps in the prCheck workflow rely on repository secrets (JDBC_PAT_TEST_TOKEN, DATABRICKS_HOST, etc.) that are not available to workflows triggered by pull requests from forks. This is a GitHub security restriction by design. These steps now include an if: github.event_name == 'push' condition so they only run on push to main (i.e., after merge). They will be skipped on PR events where secrets may be unavailable. This does not reduce test coverage — the assembly packaging tests still run post-merge on every push to main. All other PR checks (unit tests, formatting, build) continue to run on PRs as before. NO_CHANGELOG=true
1 parent a673c23 commit a4eb66d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/prCheck.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ jobs:
204204
shell: bash
205205
run: mvn -B -pl jdbc-core,assembly-uber,assembly-thin install -DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Ddependency-check.skip=true
206206

207+
# Only run on push to main; secrets are not available for fork PRs
207208
- name: Check Uber Jar Packaging
209+
if: github.event_name == 'push'
208210
shell: bash
209211
run: mvn -pl test-assembly-uber test
210212
env:
@@ -213,7 +215,9 @@ jobs:
213215
DATABRICKS_USER: ${{ secrets.DATABRICKS_USER }}
214216
DATABRICKS_TOKEN: ${{ secrets.JDBC_PAT_TEST_TOKEN }}
215217

218+
# Only run on push to main; secrets are not available for fork PRs
216219
- name: Check Thin Jar Packaging
220+
if: github.event_name == 'push'
217221
shell: bash
218222
run: mvn -pl test-assembly-thin test
219223
env:

0 commit comments

Comments
 (0)