Skip to content

Commit

Permalink
Merge pull request #4917 from evolvedbinary/improve/githubactions-basic
Browse files Browse the repository at this point in the history
Further improvements to GitHub Actions config
  • Loading branch information
reinhapa committed May 12, 2023
2 parents dfa75e1 + 7c24e8d commit 46288bf
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
key: deploy-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: deploy-${{ runner.os }}-maven
- name: Install bats
run: sudo apt-get install bats
- name: Build images
Expand Down
32 changes: 13 additions & 19 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,32 @@ jobs:
cache: 'maven'
- run: mvn -V -B dependency-check:check
timeout-minutes: 60
documentation:
name: Javadoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ env.DEV_JDK }}
cache: 'maven'
- 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
test:
name: (JDK ${{ matrix.jdk }} / ${{ matrix.os }}) Test
name: ${{ matrix.os }} Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
jdk: [ '17' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.jdk }}
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.jdk }}
java-version: ${{ env.DEV_JDK }}
cache: 'maven'
- name: Maven Build
timeout-minutes: 10
run: mvn -V -B -T 1C compile test-compile -DtrimStackTrace=false -D'dependency-check.skip' -D'license.skip'
- name: Maven Test
timeout-minutes: 60
run: mvn -V -B verify -D'dependency-check.skip' -D'license.skip'
- name: Maven Code Coverage
if: ${{ github.ref == 'refs/heads/develop' && matrix.jdk == env.DEV_JDK && matrix.os == 'ubuntu-latest' }}
run: mvn -V -B verify -DtrimStackTrace=false -D'dependency-check.skip' -D'license.skip'
- name: Javadoc (Linux only)
if: ${{ matrix.os == 'ubuntu-latest' }}
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
- name: Maven Code Coverage (Develop branch on Linux only)
if: ${{ github.ref == 'refs/heads/develop' && matrix.os == 'ubuntu-latest' }}
env:
CI_NAME: github
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }}
Expand All @@ -73,7 +67,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-jdk${{ matrix.jdk }}-build-logs
name: ${{ runner.os }}-build-logs
retention-days: 5
path: |
**/*.jfr
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/ci-xqts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ jobs:
with:
distribution: temurin
java-version: '17'
cache: 'maven'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: xqts-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: xqts-${{ runner.os }}-maven
- name: Maven XQTS Build
run: mvn -V -B clean package -DskipTests -Ddependency-check.skip=true --projects exist-xqts --also-make
- name: Run XQTS
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
key: sonarcloud-${{ runner.os }}-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: sonarcloud-${{ runner.os }}-cache
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
key: sonarcloud-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: sonarcloud-${{ runner.os }}-maven
- name: Analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
Expand Down

0 comments on commit 46288bf

Please sign in to comment.