Skip to content

Commit

Permalink
[GHA] Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hazendaz committed Jun 18, 2024
1 parent 8639138 commit 08a40b0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 21 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
cache: [maven]
distribution: [temurin]
java: [17, 21, 22, 23-ea]
os: [ubuntu-latest, macos-latest, windows-latest]
java: [17, 21, 22-ea]
distribution: ['temurin']
fail-fast: false
max-parallel: 4
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
Expand All @@ -21,11 +22,6 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: ${{ matrix.distribution }}
- name: Cache local Maven m2
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
cache: ${{ matrix.cache }}
- name: Test with Maven
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true"
3 changes: 2 additions & 1 deletion .github/workflows/coveralls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
cache: maven
distribution: temurin
java-version: 21
distribution: zulu
- name: Report Coverage to Coveralls for Pull Requests
if: github.event_name == 'pull_request'
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,18 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
cache: maven
distribution: temurin
java-version: 21
distribution: zulu
- uses: webfactory/ssh-agent@master
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Build site
run: ./mvnw site site:stage -DskipTests -B -V --no-transfer-progress -Dlicense.skip=true
run: ./mvnw site site:stage -DskipTests -Dlicense.skip=true -B -V --no-transfer-progress --settings ./.mvn/settings.xml
env:
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
- name: Deploy Site to gh-pages
uses: JamesIves/github-pages-deploy-action@v4.6.1
uses: JamesIves/github-pages-deploy-action@v4
with:
ssh-key: true
branch: gh-pages
folder: target/staging
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ssh-key: ${{ secrets.DEPLOY_KEY }}
5 changes: 3 additions & 2 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
cache: maven
distribution: temurin
java-version: 21
distribution: zulu
- name: Analyze with SonarCloud
run: ./mvnw verify jacoco:report sonar:sonar -B -Dsonar.projectKey=mybatis_jpetstore-6 -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress
run: ./mvnw verify jacoco:report sonar:sonar -B -V -Dsonar.projectKey=mybatis_jpetstore-6 -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/sonatype.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
cache: maven
distribution: temurin
java-version: 21
distribution: zulu
- name: Deploy to Sonatype
run: ./mvnw deploy -DskipTests -B -V --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true
env:
Expand Down

0 comments on commit 08a40b0

Please sign in to comment.