forked from hugegraph/hugegraph-sync
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
name: hugegraph-commons ci
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- /^release-.*$/
|
|
- /^test-.*$/
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
JAVA_VERSION: ['8', '11']
|
|
|
|
steps:
|
|
- name: Install JDK ${{ matrix.JAVA_VERSION }}
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: ${{ matrix.JAVA_VERSION }}
|
|
distribution: 'zulu'
|
|
|
|
- name: Cache Maven packages
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.m2
|
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: ${{ runner.os }}-m2
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: License check(RAT)
|
|
run: |
|
|
mvn apache-rat:check | grep -v "Downloading\|Downloaded\|Progress"
|
|
find ./ -name rat.txt -print0 | xargs -0 -I file cat file > merged-rat.txt && cat merged-rat.txt
|
|
|
|
- name: Compile
|
|
run: |
|
|
mvn compile -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded"
|
|
|
|
- name: Run test
|
|
run: |
|
|
mvn test -Dtest=UnitTestSuite
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v3.0.0
|
|
with:
|
|
file: target/jacoco.xml
|