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 Jan 11, 2025
1 parent 4ab42ad commit 2c8735b
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 105 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ jobs:
cache: [maven]
distribution: [temurin]
java: [17, 21, 23, 24-ea, 25-ea]
os: [ubuntu-latest, macos-latest]
os: [macos-latest, ubuntu-latest]
fail-fast: false
max-parallel: 4
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }} ${{ matrix.distribution }}
- name: Setup Java ${{ matrix.java }} ${{ matrix.distribution }}
uses: actions/setup-java@v4
with:
cache: ${{ matrix.cache }}
java-version: ${{ matrix.java }}
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
- name: Start Redis
uses: shogo82148/[email protected]
with:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '43 10 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ java, kotlin ]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
cache: maven
java-version: 21
distribution: 'temurin'

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
90 changes: 0 additions & 90 deletions .github/workflows/codeql.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/coveralls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ name: Coveralls
on: [push, pull_request]

jobs:
build:
coveralls:
if: github.repository_owner == 'mybatis'
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: temurin
java-version: 21
- name: Start Redis
uses: supercharge/[email protected].0
uses: shogo82148/[email protected].0
with:
redis-version: 6
redis-version: latest
- 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
2 changes: 1 addition & 1 deletion .github/workflows/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ 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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ 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:
cache: maven
distribution: temurin
java-version: 21
- name: Start Redis
uses: supercharge/[email protected].0
uses: shogo82148/[email protected].0
with:
redis-version: 6
redis-version: latest
- name: Analyze with SonarCloud
run: ./mvnw verify jacoco:report sonar:sonar -B -V -Dsonar.projectKey=mybatis_redis-cache -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_redis-cache -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress -Dsonar.scanner.skipJreProvisioning=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/sonatype.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ 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: temurin
java-version: 21
- name: Start Redis
uses: supercharge/[email protected].0
uses: shogo82148/[email protected].0
with:
redis-version: 6
redis-version: latest
- 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 2c8735b

Please sign in to comment.