Skip to content

Commit 2c2ebde

Browse files
committed
Add test action
1 parent 0eb3d02 commit 2c2ebde

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: TEST - Publish Maven Build Scan
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
create-and-verify-build-scan-publication:
8+
name: Create and attempt to publish Maven Build Scan
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout current repository
12+
uses: actions/checkout@v4
13+
- name: Checkout Maven sample project
14+
uses: actions/checkout@v4
15+
with:
16+
repository: 'gradle/gradle-enterprise-build-config-samples'
17+
path: 'sample'
18+
ref: 'main'
19+
- name: Set up JDK 8
20+
uses: actions/setup-java@v3
21+
with:
22+
java-version: '8'
23+
distribution: 'temurin'
24+
- name: Run Maven Build
25+
working-directory: ./sample/common-gradle-enterprise-maven-configuration
26+
run: mvn clean -B
27+
- name: Attempt to publish Maven Build Scans
28+
uses: ./maven-build-scan/publish
29+
with:
30+
develocity-url: 'https://foo.bar'
31+
pr-number: ${{ github.event.number }}
32+
- name: Verify publication attempt
33+
run: |
34+
if ! grep -q "[INFO] Publishing build scan..." ./maven-build-scan-publisher/build.out; then
35+
echo "Publication attempt not found in build log"
36+
exit 1
37+
fi
38+

0 commit comments

Comments
 (0)