Populate m2 directory cache and then build with tests
@@ -2,9 +2,9 @@ name: Java CI with Maven
on:
push:
- branches: [ master ]
+ branches: [ gh_actions_migration ]
pull_request:
- branches: [ master ]
+ branches: [ gh_actions_migration ]
jobs:
build:
@@ -16,5 +16,25 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 11
- - name: Build with Maven
- run: mvn -B package --file pom.xml
+ - run: mvn install -Dsilent=true -DskipTests=true -Dmaven.javadoc.skip=true -Dchecksyle.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -B dependency:go-offline
+ - uses: actions/cache@v1
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/cache@v1
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: 11
+ - run: mvn install -pl \!tests/acceptance-test -P reduce-logging -o
\ No newline at end of file
