Skip to content

Commit 53cb192

Browse files
committed
Run integration tests after each deployment (#3105)
This PR starts an `integration-test` job, whenever a snapshot or release is deployed.
1 parent 45ae36f commit 53cb192

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/build.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,21 @@ jobs:
6767
verify-reproducibility:
6868
needs: [ deploy-snapshot, deploy-release ]
6969
if: ${{ always() && (needs.deploy-snapshot.result == 'success' || needs.deploy-release.result == 'success') }}
70+
name: "verify-reproducibility (${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.project-version || needs.deploy-snapshot.outputs.project-version }})"
7071
uses: apache/logging-parent/.github/workflows/verify-reproducibility-reusable.yaml@rel/12.0.0
7172
with:
7273
nexus-url: ${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.nexus-url || needs.deploy-snapshot.outputs.nexus-url }}
73-
# Checkout the repository by branch name, since the deployment job might add commits to the branch
74-
ref: ${{ github.ref_name }}
7574
# Encode the `runs-on` input as JSON array
7675
runs-on: '["ubuntu-latest", "macos-latest", "windows-latest"]'
76+
77+
# Run integration-tests automatically after a snapshot or RC is published
78+
integration-test:
79+
needs: [ deploy-snapshot, deploy-release ]
80+
if: ${{ always() && (needs.deploy-snapshot.result == 'success' || needs.deploy-release.result == 'success') }}
81+
name: "integration-test (${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.project-version || needs.deploy-snapshot.outputs.project-version }})"
82+
uses: apache/logging-log4j-samples/.github/workflows/integration-test.yaml@main
83+
with:
84+
log4j-version: ${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.project-version || needs.deploy-snapshot.outputs.project-version }}
85+
log4j-repository-url: ${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.nexus-url || needs.deploy-snapshot.outputs.nexus-url }}
86+
# Use the `main` branch of `logging-log4j-samples`
87+
samples-ref: 'refs/heads/main'

0 commit comments

Comments
 (0)