Skip to content

Commit 69e2f2c

Browse files
authored
Merge pull request #242 from hazendaz/master
Various build updates
2 parents cfd4d04 + 15dc9aa commit 69e2f2c

File tree

12 files changed

+117
-80
lines changed

12 files changed

+117
-80
lines changed

.github/workflows/ci.yaml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,31 @@ on: [workflow_dispatch, push, pull_request]
44

55
permissions: read-all
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
test:
913
runs-on: ${{ matrix.os }}
14+
timeout-minutes: 30
1015
strategy:
1116
matrix:
1217
cache: [maven]
1318
distribution: [temurin]
14-
java: [17, 21, 24, 25-ea]
15-
os: [ubuntu-latest, macos-latest, windows-latest]
19+
java: [17, 21, 25, 26-ea]
20+
os: [macos-latest, ubuntu-latest, windows-latest]
1621
fail-fast: false
17-
max-parallel: 4
22+
max-parallel: 6
1823
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
1924

2025
steps:
21-
- uses: actions/checkout@v5
22-
- name: Set up JDK ${{ matrix.java }} ${{ matrix.distribution }}
23-
uses: actions/setup-java@v5
26+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
27+
- name: Setup Java ${{ matrix.java }} ${{ matrix.distribution }}
28+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
2429
with:
25-
java-version: ${{ matrix.java }}
26-
distribution: ${{ matrix.distribution }}
2730
cache: ${{ matrix.cache }}
31+
distribution: ${{ matrix.distribution }}
32+
java-version: ${{ matrix.java }}
2833
- name: Test with Maven
29-
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true"
34+
run: ./mvnw test --batch-mode --no-transfer-progress --show-version -D"license.skip=true"

.github/workflows/codeql.yml renamed to .github/workflows/codeql.yaml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ on:
66
pull_request:
77
branches: [ master ]
88
schedule:
9-
- cron: '40 9 * * 2'
9+
- cron: '43 10 * * 2'
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
1014

1115
jobs:
1216
analyze:
1317
name: Analyze
14-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
15-
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
18+
runs-on: 'ubuntu-latest'
19+
timeout-minutes: 30
1620
permissions:
1721
actions: read
1822
contents: read
@@ -21,29 +25,29 @@ jobs:
2125
strategy:
2226
fail-fast: false
2327
matrix:
24-
language: [ 'java-kotlin' ]
28+
language: [ javascript, java, kotlin ]
2529

2630
steps:
2731
- name: Checkout
28-
uses: actions/checkout@v5
32+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2933

3034
- name: Setup Java
31-
uses: actions/setup-java@v5
35+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
3236
with:
3337
cache: maven
3438
distribution: 'temurin'
3539
java-version: 21
3640

3741
- name: Initialize CodeQL
38-
uses: github/codeql-action/init@v3
42+
uses: github/codeql-action/init@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3
3943
with:
4044
languages: ${{ matrix.language }}
4145
queries: +security-and-quality
4246

4347
- name: Autobuild
44-
uses: github/codeql-action/autobuild@v3
48+
uses: github/codeql-action/autobuild@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3
4549

4650
- name: Perform CodeQL Analysis
47-
uses: github/codeql-action/analyze@v3
51+
uses: github/codeql-action/analyze@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3
4852
with:
4953
category: "/language:${{ matrix.language }}"

.github/workflows/coveralls.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,33 @@ on: [push, pull_request]
44

55
permissions: read-all
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
8-
build:
12+
coveralls:
913
if: github.repository_owner == 'mybatis'
1014
runs-on: ubuntu-latest
15+
timeout-minutes: 30
1116
steps:
12-
- uses: actions/checkout@v5
13-
- name: Set up JDK
14-
uses: actions/setup-java@v5
17+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
18+
- name: Setup Java
19+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
1520
with:
1621
cache: maven
1722
distribution: temurin
1823
java-version: 21
24+
- name: Run the build
25+
run: ./mvnw test --batch-mode --no-transfer-progress --quiet --show-version -Dlicense.skip=true
1926
- name: Report Coverage to Coveralls for Pull Requests
2027
if: github.event_name == 'pull_request'
21-
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress
28+
run: ./mvnw jacoco:report coveralls:report --batch-mode --no-transfer-progress -DpullRequest=${PR_NUMBER} -DrepoToken=${GITHUB_TOKEN} -DserviceName=github
2229
env:
2330
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2431
PR_NUMBER: ${{ github.event.number }}
2532
- name: Report Coverage to Coveralls for General Push
2633
if: github.event_name == 'push'
27-
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github --no-transfer-progress
34+
run: ./mvnw jacoco:report coveralls:report --batch-mode --no-transfer-progress -DrepoToken=${GITHUB_TOKEN} -DserviceName=github
2835
env:
2936
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/site.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,30 @@ on:
88
permissions:
99
contents: write
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
1115
jobs:
1216
build:
1317
if: github.repository_owner == 'mybatis' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
1418
runs-on: ubuntu-latest
19+
timeout-minutes: 30
1520
steps:
16-
- uses: actions/checkout@v5
17-
- name: Set up JDK
18-
uses: actions/setup-java@v5
21+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
22+
- name: Setup Java
23+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
1924
with:
2025
cache: maven
2126
distribution: temurin
2227
java-version: 21
2328
- name: Build site
24-
run: ./mvnw site site:stage -DskipTests -Dlicense.skip=true -B -V --no-transfer-progress --settings ./.mvn/settings.xml
29+
run: ./mvnw site site:stage --batch-mode --no-transfer-progress --settings ./.mvn/settings.xml --show-version -Dlicense.skip=true -DskipTests
2530
env:
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2732
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
2833
- name: Deploy Site to gh-pages
29-
uses: JamesIves/github-pages-deploy-action@v4
34+
uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # v4
3035
with:
3136
branch: gh-pages
3237
folder: target/staging

.github/workflows/sonar.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,34 @@ on:
77

88
permissions: read-all
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
env:
15+
SONAR_ORGANIZATION: mybatis
16+
SONAR_PROJECT_KEY: mybatis_ehcache-cache
17+
1018
jobs:
1119
build:
1220
if: github.repository_owner == 'mybatis'
1321
runs-on: ubuntu-latest
22+
timeout-minutes: 30
1423
steps:
15-
- uses: actions/checkout@v5
24+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
1625
with:
1726
# Disabling shallow clone is recommended for improving relevancy of reporting
1827
fetch-depth: 0
19-
- name: Set up JDK
20-
uses: actions/setup-java@v5
28+
- name: Setup Java
29+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
2130
with:
2231
cache: maven
2332
distribution: temurin
2433
java-version: 21
34+
- name: Set SONAR_SCANNER_JAVA_OPTS
35+
run: echo "SONAR_SCANNER_JAVA_OPTS=-Xmx512m" >> ${GITHUB_ENV}
2536
- name: Analyze with SonarCloud
26-
run: ./mvnw verify jacoco:report sonar:sonar -B -V -Dsonar.projectKey=mybatis_ehcache-cache -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress
37+
run: ./mvnw verify jacoco:report sonar:sonar --batch-mode --no-transfer-progress --show-version -Dlicense.skip=true -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=${SONAR_ORGANIZATION} -Dsonar.projectKey=${SONAR_PROJECT_KEY} -Dsonar.scanner.skipJreProvisioning=true -Dsonar.token=${SONAR_TOKEN}
2738
env:
2839
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2940
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/sonatype.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,25 @@ on:
77

88
permissions: read-all
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
build:
1216
if: github.repository_owner == 'mybatis' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
1317
runs-on: ubuntu-latest
18+
timeout-minutes: 30
1419
steps:
15-
- uses: actions/checkout@v5
16-
- name: Set up JDK
17-
uses: actions/setup-java@v5
20+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
21+
- name: Setup Java
22+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
1823
with:
1924
cache: maven
2025
distribution: temurin
2126
java-version: 21
2227
- name: Deploy to Sonatype
23-
run: ./mvnw deploy -DskipTests -B -V --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true
28+
run: ./mvnw deploy --batch-mode --no-transfer-progress --settings ./.mvn/settings.xml --show-version -Dlicense.skip=true -DskipTests
2429
env:
2530
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
2631
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}

.mvn/jvm.config

Whitespace-only changes.

.mvn/maven.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
-Daether.checksums.algorithms=SHA-512,SHA-256,SHA-1,MD5
22
-Daether.connector.smartChecksums=false
3+
--no-transfer-progress

.mvn/wrapper/MavenWrapperDownloader.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@
2525
import java.net.URL;
2626
import java.nio.file.Files;
2727
import java.nio.file.Path;
28-
import java.nio.file.Paths;
2928
import java.nio.file.StandardCopyOption;
3029
import java.util.concurrent.ThreadLocalRandom;
3130

3231
public final class MavenWrapperDownloader {
33-
private static final String WRAPPER_VERSION = "3.3.2";
32+
private static final String WRAPPER_VERSION = "3.3.4";
3433

3534
private static final boolean VERBOSE = Boolean.parseBoolean(System.getenv("MVNW_VERBOSE"));
3635

@@ -45,8 +44,11 @@ public static void main(String[] args) {
4544
try {
4645
log(" - Downloader started");
4746
final URL wrapperUrl = URI.create(args[0]).toURL();
48-
final String jarPath = args[1].replace("..", ""); // Sanitize path
49-
final Path wrapperJarPath = Paths.get(jarPath).toAbsolutePath().normalize();
47+
final Path baseDir = Path.of(".").toAbsolutePath().normalize();
48+
final Path wrapperJarPath = baseDir.resolve(args[1]).normalize();
49+
if (!wrapperJarPath.startsWith(baseDir)) {
50+
throw new IOException("Invalid path: outside of allowed directory");
51+
}
5052
downloadFileFromURL(wrapperUrl, wrapperJarPath);
5153
log("Done");
5254
} catch (IOException e) {
Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
1-
# Licensed to the Apache Software Foundation (ASF) under one
2-
# or more contributor license agreements. See the NOTICE file
3-
# distributed with this work for additional information
4-
# regarding copyright ownership. The ASF licenses this file
5-
# to you under the Apache License, Version 2.0 (the
6-
# "License"); you may not use this file except in compliance
7-
# with the License. You may obtain a copy of the License at
8-
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
10-
#
11-
# Unless required by applicable law or agreed to in writing,
12-
# software distributed under the License is distributed on an
13-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14-
# KIND, either express or implied. See the License for the
15-
# specific language governing permissions and limitations
16-
# under the License.
17-
wrapperVersion=3.3.2
181
distributionType=source
192
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
20-
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar
3+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.4/maven-wrapper-3.3.4.jar
4+
wrapperVersion=3.3.4

0 commit comments

Comments
 (0)