Skip to content

Commit 5fb4441

Browse files
build: Action for mvn verify, on all three Operation Systems
Signed-off-by: Andreas Reichel <[email protected]>
1 parent 297ef84 commit 5fb4441

File tree

1 file changed

+48
-9
lines changed

1 file changed

+48
-9
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,63 +2,102 @@ name: CI Pipeline
22

33
on:
44
push:
5-
branches: [ "master" ]
5+
branches: [ "**" ] # Run on every commit to any branch
66
pull_request:
7-
branches: [ "master" ]
7+
branches: [ "**" ] # Run for PRs from any branch
88
workflow_dispatch:
99

1010
permissions: write-all
1111

1212
jobs:
1313
gradle_check:
14-
runs-on: ubuntu-latest
14+
name: Gradle Check
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ ubuntu-latest, windows-latest, macos-latest ]
1519
steps:
1620
- uses: actions/checkout@main
1721
with:
1822
fetch-depth: 0
23+
1924
- name: Set up JDK 17
2025
uses: actions/setup-java@main
2126
with:
2227
java-version: '17'
2328
distribution: 'temurin'
24-
- name: Build with Gradle
29+
30+
- name: Set up Gradle
2531
uses: gradle/actions/setup-gradle@main
32+
2633
- name: Run Gradle Check
2734
run: ./gradlew check
2835

36+
maven_verify:
37+
name: Maven Verify
38+
needs: gradle_check # ✅ Run only after Gradle check succeeds
39+
runs-on: ${{ matrix.os }}
40+
strategy:
41+
matrix:
42+
os: [ ubuntu-latest, windows-latest, macos-latest ]
43+
steps:
44+
- uses: actions/checkout@main
45+
with:
46+
fetch-depth: 0
47+
48+
- name: Set up JDK 17
49+
uses: actions/setup-java@main
50+
with:
51+
java-version: '17'
52+
distribution: 'temurin'
53+
54+
- name: Run Maven Verify
55+
run: mvn --batch-mode verify
56+
2957
gradle_publish:
30-
needs: gradle_check
58+
name: Gradle Publish
59+
needs: [ gradle_check, maven_verify ] # ✅ Run only after both succeed
60+
if: github.ref == 'refs/heads/master' && github.repository == 'YOUR-ORG/YOUR-REPO' # ✅ Only for master branch of main repo
3161
runs-on: ubuntu-latest
3262
steps:
3363
- uses: actions/checkout@main
3464
with:
3565
fetch-depth: 0
66+
3667
- name: Set up JDK 17
3768
uses: actions/setup-java@main
3869
with:
3970
java-version: '17'
4071
distribution: 'temurin'
72+
4173
- name: Build with Gradle
4274
uses: gradle/actions/setup-gradle@main
75+
4376
- name: Publish with Gradle
4477
run: ./gradlew publish
4578
env:
4679
ossrhUsername: ${{ secrets.OSSRHUSERNAME }}
4780
ossrhPassword: ${{ secrets.OSSRHPASSWORD }}
81+
4882
- uses: actions/setup-python@main
83+
4984
- name: Install XSLT Processor
50-
run: sudo apt-get install xsltproc sphinx-common
85+
run: sudo apt-get install -y xsltproc sphinx-common
86+
5187
- name: Install Python dependencies
52-
#run: pip install furo myst_parser sphinx-prompt sphinx_substitution_extensions sphinx_issues sphinx_inline_tabs pygments
5388
run: pip install furo myst_parser sphinx_substitution_extensions sphinx_issues sphinx_inline_tabs pygments
89+
5490
- name: Build Sphinx documentation with Gradle
55-
run: ./gradlew -DFLOATING_TOC=false gitChangelogTask renderRR xslt xmldoc sphinx
56-
- name: Deploy Sphinx documentation
91+
run: FLOATING_TOC=false ./gradlew -DFLOATING_TOC=false gitChangelogTask renderRR xslt xmldoc sphinx
92+
93+
- name: Configure GitHub Pages
5794
uses: actions/configure-pages@main
95+
5896
- name: Upload artifact
5997
uses: actions/upload-pages-artifact@main
6098
with:
6199
path: 'build/sphinx'
100+
62101
- name: Deploy to GitHub Pages
63102
id: deployment
64103
uses: actions/deploy-pages@main

0 commit comments

Comments
 (0)