6ba05fa7a8
* Replace `flatten-maven-plugin` with `easyj-maven-plugin` * revert indent * apache-rat-plugin exclude `.flattened-pom.xml` * fix style * optimize github action * optimize github action * fix dependencies * upgrade easyj-maven-plugin to 1.1.5 * optimize github action * optimize spring-boot-maven-plugin configuration
50 lines
2.3 KiB
YAML
50 lines
2.3 KiB
YAML
# This workflow will build a Java project with Maven
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
|
|
|
name: "Continuous Integration"
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, develop, v1.x-develop, v1.X ]
|
|
pull_request:
|
|
branches: [ develop, v1.x-develop ]
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
java: [8]
|
|
steps:
|
|
- name: "Cache Maven Repos"
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.m2/repository
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-maven-
|
|
- name: "Checkout"
|
|
uses: actions/checkout@v3
|
|
- name: "Set up JDK ${{ matrix.java }}"
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: ${{ matrix.java }}
|
|
distribution: 'zulu'
|
|
architecture: x64
|
|
- name: "Print maven version"
|
|
run: mvn -version
|
|
- name: "Check with Maven"
|
|
run: mvn -B clean package apache-rat:check findbugs:findbugs -DskipTests -e -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
|
- name: "Build with Maven"
|
|
run: mvn -Prelease-nacos -DskipTests clean install -U -e -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
|
- name: "Test With Maven"
|
|
run: mvn -Prelease-nacos clean test -DtrimStackTrace=false -e -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
|
- name: "Codecov"
|
|
uses: codecov/codecov-action@v3.1.0
|
|
with:
|
|
files: ./address/target/site/jacoco/jacoco.xml,./api/target/site/jacoco/jacoco.xml,./auth/target/site/jacoco/jacoco.xml,./client/target/site/jacoco/jacoco.xml,./common/target/site/jacoco/jacoco.xml,./consistency/target/site/jacoco/jacoco.xml,./console/target/site/jacoco/jacoco.xml,./core/target/site/jacoco/jacoco.xml,./naming/target/site/jacoco/jacoco.xml,./plugin-default-impl/target/site/jacoco/jacoco.xml,./plugin/auth/target/site/jacoco/jacoco.xml,./plugin/encryption/target/site/jacoco/jacoco.xml,./sys/target/site/jacoco/jacoco.xml
|