Skip to content

Commit

Permalink
Merge pull request #2683 from hazendaz/master
Browse files Browse the repository at this point in the history
[gha] add cache throughout / change name on coveralls from build to c…
  • Loading branch information
hazendaz authored Jan 2, 2025
2 parents 92be5bf + 311ccdd commit 8a517a9
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 13 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019, windows-latest]
java: [21, 23, 24-ea, 25-ea]
cache: [maven]
distribution: ['temurin']
java: [21, 23, 24-ea, 25-ea]
os: [windows-2019, windows-latest]
fail-fast: false
max-parallel: 4
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
Expand All @@ -23,7 +24,8 @@ jobs:
- name: Set up JDK ${{ matrix.java }} ${{ matrix.distribution }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
cache: ${{ matrix.cache }}
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
- name: Test with Maven
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true" -D"net.bytebuddy.experimental=true"
3 changes: 2 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: maven
java-version: 21
distribution: 'zulu'

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/coveralls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ defaults:
on: [push, pull_request]

jobs:
build:
coveralls:
if: github.repository_owner == 'waffle'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 21
cache: maven
distribution: zulu
java-version: 21
- name: Report Coverage to Coveralls for Pull Requests
if: github.event_name == 'pull_request'
run: ./mvnw -B -V test jacoco:report coveralls:report -q -D"license.skip=true" -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress -Pcoveralls
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/coverity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: maven
java-version: 21
distribution: zulu
- name: Analyze with Coverity
run: |
wget -q https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_TOKEN&project=Waffle%2Fwaffle" -O coverity_tool.tgz
tar -xf coverity_tool.tgz
./cov-analysis-linux64-*/bin/cov-build --dir cov-int ./mvnw -B -DskipTests=true -D"license.skip=true" verify
./cov-analysis-linux64-*/bin/cov-build --dir cov-int ./mvnw -B -V -DskipTests=true --no-transfer-progress -D"license.skip=true" verify
tar czvf waffle.tgz cov-int
curl --form token=$COVERITY_TOKEN \
--form email=$EMAIL \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: maven
distribution: zulu
java-version: 21
- name: Build site
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ jobs:
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Set up JDK
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 21
cache: maven
distribution: zulu
java-version: 21
- name: Analyze with SonarCloud
run: ./mvnw verify jacoco:report sonar:sonar -B -V -D"sonar.projectKey=Waffle_waffle" -D"sonar.organization=waffle" -D"sonar.host.url=https://sonarcloud.io" -D"sonar.token=$SONAR_TOKEN" -D"license.skip=true" --no-transfer-progress -D"sonar.scanner.skipJreProvisioning=true"
env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/sonatype.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: maven
java-version: 21
distribution: zulu
- name: Deploy to Sonatype
Expand Down

0 comments on commit 8a517a9

Please sign in to comment.