Skip to content

Commit e31dfda

Browse files
committed
[GHA] Update actions
some items changed for consistency to other mybatis projects. May need looked at more. Most of the project fails to build as it is and has been flaky.
1 parent c1be8f9 commit e31dfda

File tree

4 files changed

+24
-22
lines changed

4 files changed

+24
-22
lines changed

.github/workflows/ci.yaml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,32 @@
11
name: Java CI
2-
on:
3-
push:
4-
pull_request:
2+
3+
on: [workflow_dispatch, push, pull_request]
4+
55
jobs:
6-
build:
7-
name: Verify on ${{ matrix.os }} (Java ${{ matrix.java }})
6+
test:
87
runs-on: ${{ matrix.os }}
98
strategy:
109
matrix:
11-
os:
12-
- 'ubuntu-latest'
13-
- 'windows-latest'
14-
- 'macos-latest'
15-
java:
16-
- 21
10+
os: [ubuntu-latest, macos-latest, windows-latest]
11+
java: [21, 22-ea]
12+
distribution: ['temurin']
1713
fail-fast: false
18-
max-parallel: 6
14+
max-parallel: 4
15+
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
16+
1917
steps:
2018
- uses: actions/checkout@v4
21-
- name: Set up JDK
19+
- name: Set up JDK ${{ matrix.java }} ${{ matrix.distribution }}
2220
uses: actions/setup-java@v3
2321
with:
2422
java-version: ${{ matrix.java }}
25-
distribution: 'zulu'
23+
distribution: ${{ matrix.distribution }}
2624
- name: Cache local Maven repository
2725
uses: actions/cache@v3
2826
with:
2927
path: ~/.m2/repository
3028
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
3129
restore-keys: |
3230
${{ runner.os }}-maven-
33-
- name: Show a Java version
34-
run: java -version
35-
- name: Verify a mybatis-spring-native-core
36-
run: ./mvnw -U -pl .,core,extensions clean verify -D"license.skip=true"
31+
- name: Test with Maven
32+
run: ./mvnw -pl core,extensions test -B -V --no-transfer-progress -D"license.skip=true"

.github/workflows/coveralls.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Coveralls
2+
23
on: [push, pull_request]
4+
35
jobs:
46
build:
57
if: github.repository_owner == 'mybatis'
@@ -20,12 +22,12 @@ jobs:
2022
${{ runner.os }}-maven-
2123
- name: Report Coverage to Coveralls for Pull Requests
2224
if: github.event_name == 'pull_request'
23-
run: ./mvnw -pl core,extensions test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER
25+
run: ./mvnw -pl core,extensions -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress
2426
env:
2527
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2628
PR_NUMBER: ${{ github.event.number }}
2729
- name: Report Coverage to Coveralls for General Push
2830
if: github.event_name == 'push'
29-
run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github
31+
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github --no-transfer-progress
3032
env:
3133
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sonar.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: SonarCloud
2+
23
on:
34
push:
45
branches:
56
- master
7+
68
jobs:
79
build:
810
if: github.repository_owner == 'mybatis'
@@ -25,7 +27,7 @@ jobs:
2527
restore-keys: |
2628
${{ runner.os }}-maven-
2729
- name: Analyze with SonarCloud
28-
run: ./mvnw verify jacoco:report sonar:sonar -B -Dsonar.projectKey=mybatis_spring-native -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dlicense.skip=true
30+
run: ./mvnw verify jacoco:report sonar:sonar -B -Dsonar.projectKey=mybatis_spring-native -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress
2931
env:
3032
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3133
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/sonatype.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: Sonatype
2+
23
on:
34
push:
45
branches:
56
- master
7+
68
jobs:
79
build:
810
if: github.repository_owner == 'mybatis' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
@@ -22,7 +24,7 @@ jobs:
2224
restore-keys: |
2325
${{ runner.os }}-maven-
2426
- name: Deploy to Sonatype
25-
run: ./mvnw deploy -DskipTests -B --settings ./.mvn/settings.xml -Dlicense.skip=true
27+
run: ./mvnw deploy -DskipTests -B -V --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true
2628
env:
2729
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
2830
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}

0 commit comments

Comments
 (0)