2021-06-17 15:15:54 +08:00
|
|
|
# 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
|
|
|
|
|
2023-03-02 10:43:08 +08:00
|
|
|
name: "Integration Test"
|
2021-06-17 15:15:54 +08:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master, develop, v1.x-develop, v1.X ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ develop, v1.x-develop ]
|
|
|
|
|
2022-09-26 10:34:33 +08:00
|
|
|
permissions:
|
|
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
|
2021-06-17 15:15:54 +08:00
|
|
|
jobs:
|
2023-03-02 10:43:08 +08:00
|
|
|
test:
|
2021-06-17 15:15:54 +08:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest]
|
2021-10-21 11:37:55 +08:00
|
|
|
java: [8, 8.0.192, 11, 11.0.3]
|
2021-06-17 15:15:54 +08:00
|
|
|
steps:
|
2023-03-02 10:43:08 +08:00
|
|
|
- name: "Cache Maven Repos"
|
2022-11-30 09:27:20 +08:00
|
|
|
uses: actions/cache@v3
|
2021-06-17 15:15:54 +08:00
|
|
|
with:
|
|
|
|
path: ~/.m2/repository
|
|
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-maven-
|
2023-03-02 10:43:08 +08:00
|
|
|
- name: "Checkout"
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: "Set up JDK ${{ matrix.java }}"
|
2022-11-30 09:27:20 +08:00
|
|
|
uses: actions/setup-java@v3
|
2021-06-17 15:15:54 +08:00
|
|
|
with:
|
|
|
|
java-version: ${{ matrix.java }}
|
2021-10-21 11:37:55 +08:00
|
|
|
distribution: 'zulu'
|
2021-06-17 15:15:54 +08:00
|
|
|
architecture: x64
|
2023-03-02 10:43:08 +08:00
|
|
|
- name: "Print maven version"
|
|
|
|
run: mvn -version
|
|
|
|
- name: "Test Config"
|
|
|
|
run: mvn clean package -Pcit-test -e -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
|
|
|
- name: "Clean Env"
|
|
|
|
run: mvn clean -Premove-test-data -e -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
|
|
|
- name: "Test Naming"
|
|
|
|
run: mvn clean package -Pnit-test -e -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
|
|
|
- name: "Clean Env"
|
|
|
|
run: mvn clean -Premove-test-data -e -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
2021-06-17 15:15:54 +08:00
|
|
|
|