Skip to content

Commit 46288bf

Browse files
authored
Merge pull request #4917 from evolvedbinary/improve/githubactions-basic
Further improvements to GitHub Actions config
2 parents dfa75e1 + 7c24e8d commit 46288bf

File tree

4 files changed

+25
-26
lines changed

4 files changed

+25
-26
lines changed

.github/workflows/ci-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
uses: actions/cache@v3
2525
with:
2626
path: ~/.m2
27-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
28-
restore-keys: ${{ runner.os }}-m2
27+
key: deploy-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: deploy-${{ runner.os }}-maven
2929
- name: Install bats
3030
run: sudo apt-get install bats
3131
- name: Build images

.github/workflows/ci-test.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,38 +30,32 @@ jobs:
3030
cache: 'maven'
3131
- run: mvn -V -B dependency-check:check
3232
timeout-minutes: 60
33-
documentation:
34-
name: Javadoc
35-
runs-on: ubuntu-latest
36-
steps:
37-
- uses: actions/checkout@v3
38-
- uses: actions/setup-java@v3
39-
with:
40-
distribution: temurin
41-
java-version: ${{ env.DEV_JDK }}
42-
cache: 'maven'
43-
- run: mvn -V -B -q -T 2C install javadoc:javadoc -DskipTests -D'dependency-check.skip' -D'license.skip' --projects '!exist-distribution,!exist-installer' --also-make
4433
test:
45-
name: (JDK ${{ matrix.jdk }} / ${{ matrix.os }}) Test
34+
name: ${{ matrix.os }} Test
4635
strategy:
4736
fail-fast: false
4837
matrix:
4938
os: [ubuntu-latest, windows-latest, macOS-latest]
50-
jdk: [ '17' ]
5139
runs-on: ${{ matrix.os }}
5240
steps:
5341
- uses: actions/checkout@v3
54-
- name: Set up JDK ${{ matrix.jdk }}
42+
- name: Set up JDK
5543
uses: actions/setup-java@v3
5644
with:
5745
distribution: temurin
58-
java-version: ${{ matrix.jdk }}
46+
java-version: ${{ env.DEV_JDK }}
5947
cache: 'maven'
48+
- name: Maven Build
49+
timeout-minutes: 10
50+
run: mvn -V -B -T 1C compile test-compile -DtrimStackTrace=false -D'dependency-check.skip' -D'license.skip'
6051
- name: Maven Test
6152
timeout-minutes: 60
62-
run: mvn -V -B verify -D'dependency-check.skip' -D'license.skip'
63-
- name: Maven Code Coverage
64-
if: ${{ github.ref == 'refs/heads/develop' && matrix.jdk == env.DEV_JDK && matrix.os == 'ubuntu-latest' }}
53+
run: mvn -V -B verify -DtrimStackTrace=false -D'dependency-check.skip' -D'license.skip'
54+
- name: Javadoc (Linux only)
55+
if: ${{ matrix.os == 'ubuntu-latest' }}
56+
run: mvn -V -B -q -T 1C install javadoc:javadoc -DskipTests -D'dependency-check.skip' -D'license.skip' --projects '!exist-distribution,!exist-installer' --also-make
57+
- name: Maven Code Coverage (Develop branch on Linux only)
58+
if: ${{ github.ref == 'refs/heads/develop' && matrix.os == 'ubuntu-latest' }}
6559
env:
6660
CI_NAME: github
6761
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }}
@@ -73,7 +67,7 @@ jobs:
7367
if: always()
7468
uses: actions/upload-artifact@v3
7569
with:
76-
name: ${{ runner.os }}-jdk${{ matrix.jdk }}-build-logs
70+
name: ${{ runner.os }}-build-logs
7771
retention-days: 5
7872
path: |
7973
**/*.jfr

.github/workflows/ci-xqts.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ jobs:
1414
with:
1515
distribution: temurin
1616
java-version: '17'
17-
cache: 'maven'
17+
- name: Cache Maven packages
18+
uses: actions/cache@v3
19+
with:
20+
path: ~/.m2
21+
key: xqts-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
22+
restore-keys: xqts-${{ runner.os }}-maven
1823
- name: Maven XQTS Build
1924
run: mvn -V -B clean package -DskipTests -Ddependency-check.skip=true --projects exist-xqts --also-make
2025
- name: Run XQTS

.github/workflows/sonarcloud.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ jobs:
2323
uses: actions/cache@v3
2424
with:
2525
path: ~/.sonar/cache
26-
key: ${{ runner.os }}-sonar
27-
restore-keys: ${{ runner.os }}-sonar
26+
key: sonarcloud-${{ runner.os }}-cache-${{ hashFiles('**/pom.xml') }}
27+
restore-keys: sonarcloud-${{ runner.os }}-cache
2828
- name: Cache Maven packages
2929
uses: actions/cache@v3
3030
with:
3131
path: ~/.m2
32-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
33-
restore-keys: ${{ runner.os }}-m2
32+
key: sonarcloud-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
33+
restore-keys: sonarcloud-${{ runner.os }}-maven
3434
- name: Analyze
3535
env:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any

0 commit comments

Comments
 (0)