Skip to content

Commit

Permalink
[GHA] Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hazendaz committed Nov 10, 2023
1 parent c55f442 commit 944155b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 74 deletions.
28 changes: 6 additions & 22 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,25 @@
#
# Copyright 2018-2021 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Java CI

on: [push, pull_request]
on: [workflow_dispatch, push, pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
java: [11, 17, 21]
distribution: ['zulu']
os: [ubuntu-latest, macos-latest, windows-latest]
java: [11, 17, 21, 22-ea]
distribution: ['temurin']
fail-fast: false
max-parallel: 4
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Set up JDK
- name: Set up JDK ${{ matrix.java }} ${{ matrix.distribution }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: ${{ matrix.distribution }}
- name: Test with Maven
run: ./mvnw test -B -D"license.skip=true" -D"log.level.thymeleaf.config=info"
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true" -D"log.level.thymeleaf.config=info"
20 changes: 2 additions & 18 deletions .github/workflows/coveralls.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
#
# Copyright 2018-2020 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Coveralls

on: [push, pull_request]
Expand All @@ -31,12 +15,12 @@ jobs:
distribution: zulu
- name: Report Coverage to Coveralls for Pull Requests
if: github.event_name == 'pull_request'
run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -Dlog.level.thymeleaf.config=info -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -Dlog.level.thymeleaf.config=info -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
- name: Report Coverage to Coveralls for General Push
if: github.event_name == 'push'
run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -Dlog.level.thymeleaf.config=info -DrepoToken=$GITHUB_TOKEN -DserviceName=github
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -Dlog.level.thymeleaf.config=info -DrepoToken=$GITHUB_TOKEN -DserviceName=github --no-transfer-progress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 1 addition & 17 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
#
# Copyright 2018-2020 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: SonarCloud

on:
Expand All @@ -36,7 +20,7 @@ jobs:
java-version: 21
distribution: zulu
- name: Analyze with SonarCloud
run: ./mvnw verify jacoco:report sonar:sonar -B -Dlog.level.thymeleaf.config=info -Dsonar.projectKey=mybatis_thymeleaf-scripting -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dlicense.skip=true
run: ./mvnw verify jacoco:report sonar:sonar -B -Dlog.level.thymeleaf.config=info -Dsonar.projectKey=mybatis_thymeleaf-scripting -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
18 changes: 1 addition & 17 deletions .github/workflows/sonatype.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
#
# Copyright 2018-2020 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Sonatype

on:
Expand All @@ -33,7 +17,7 @@ jobs:
java-version: 21
distribution: zulu
- name: Deploy to Sonatype
run: ./mvnw deploy -DskipTests -B -Dlog.level.thymeleaf.config=info --settings ./.mvn/settings.xml -Dlicense.skip=true
run: ./mvnw deploy -DskipTests -B -V -Dlog.level.thymeleaf.config=info --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true
env:
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}

0 comments on commit 944155b

Please sign in to comment.