Skip to content

Commit 3846632

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 382ea9b commit 3846632

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.github/workflows/build.yaml

+13-2
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,21 @@ jobs:
7777
verify-reproducibility:
7878
needs: [ deploy-snapshot, deploy-release ]
7979
if: ${{ always() && (needs.deploy-snapshot.result == 'success' || needs.deploy-release.result == 'success') }}
80+
name: "verify-reproducibility (${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.project-version || needs.deploy-snapshot.outputs.project-version }})"
8081
uses: apache/logging-parent/.github/workflows/verify-reproducibility-reusable.yaml@rel/12.0.0
8182
with:
8283
nexus-url: ${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.nexus-url || needs.deploy-snapshot.outputs.nexus-url }}
83-
# Checkout the repository by branch name, since the deployment job might add commits to the branch
84-
ref: ${{ github.ref_name }}
8584
# Encode the `runs-on` input as JSON array
8685
runs-on: '["ubuntu-latest", "macos-latest", "windows-latest"]'
86+
87+
# Run integration-tests automatically after a snapshot or RC is published
88+
integration-test:
89+
needs: [ deploy-snapshot, deploy-release ]
90+
if: ${{ always() && (needs.deploy-snapshot.result == 'success' || needs.deploy-release.result == 'success') }}
91+
name: "integration-test (${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.project-version || needs.deploy-snapshot.outputs.project-version }})"
92+
uses: apache/logging-log4j-samples/.github/workflows/integration-test.yaml@main
93+
with:
94+
log4j-version: ${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.project-version || needs.deploy-snapshot.outputs.project-version }}
95+
log4j-repository-url: ${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.nexus-url || needs.deploy-snapshot.outputs.nexus-url }}
96+
# Use the `main` branch of `logging-log4j-samples`
97+
samples-ref: 'refs/heads/main'

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@
307307
<properties>
308308

309309
<!-- project version -->
310-
<revision>2.25.0-SNAPSHOT</revision>
310+
<revision>2.25.0.pr3105-SNAPSHOT</revision>
311311
<!-- Versions used on the site: no snapshots! -->
312312
<site-log4j-api.version>2.24.3</site-log4j-api.version>
313313
<site-log4j-core.version>2.24.3</site-log4j-core.version>

0 commit comments

Comments
 (0)