|
1 | | -name: Java CI Build and Test |
| 1 | +name: CI |
2 | 2 |
|
3 | 3 | on: [push, pull_request] |
4 | 4 |
|
5 | 5 |
|
6 | 6 | jobs: |
7 | 7 | build: |
8 | | - |
9 | | - runs-on: ${{ matrix.os }} |
| 8 | + name: build-only (Java ${{ matrix.java }}) |
| 9 | + runs-on: ubuntu-latest |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + java: [ 11 ] |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v2 |
| 15 | + - name: Set up JDK |
| 16 | + uses: actions/setup-java@v1 |
| 17 | + with: |
| 18 | + java-version: ${{ matrix.java }} |
| 19 | + - name: Cached .m2 |
| 20 | + uses: actions/cache@v1 |
| 21 | + with: |
| 22 | + path: ~/.m2/repository |
| 23 | + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| 24 | + restore-keys: | |
| 25 | + ${{ runner.os }}-maven- |
| 26 | + - name: Maven Install (skipTests) |
| 27 | + run: mvn -B install -DskipTests -D enable-ci --file pom.xml |
| 28 | + site: |
| 29 | + name: site (Java ${{ matrix.java }}) |
| 30 | + runs-on: ubuntu-latest |
10 | 31 | strategy: |
11 | 32 | matrix: |
12 | | - os: [windows-latest, ubuntu-latest] |
13 | | - java: [ '1.8.0', '11.0.x', '13.0.x' ] |
| 33 | + java: [ 11 ] |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v2 |
| 36 | + - name: Set up JDK |
| 37 | + uses: actions/setup-java@v1 |
| 38 | + with: |
| 39 | + java-version: ${{ matrix.java }} |
| 40 | + - uses: actions/cache@v1 |
| 41 | + with: |
| 42 | + path: ~/.m2/repository |
| 43 | + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| 44 | + restore-keys: | |
| 45 | + ${{ runner.os }}-maven- |
| 46 | + - name: Maven Site |
| 47 | + run: mvn -B site -D enable-ci --file pom.xml |
| 48 | + test: |
| 49 | + name: test (${{ matrix.os }}, Java ${{ matrix.java }}) |
| 50 | + runs-on: ${{ matrix.os }}-latest |
| 51 | + strategy: |
| 52 | + matrix: |
| 53 | + os: [ ubuntu, windows ] |
| 54 | + java: [ 8, 11, 13 ] |
14 | 55 | steps: |
15 | 56 | - uses: actions/checkout@v2 |
16 | 57 | - name: Set up JDK |
17 | 58 | uses: actions/setup-java@v1 |
18 | 59 | with: |
19 | 60 | java-version: ${{ matrix.java }} |
20 | | - - name: Maven Download all dependencies |
21 | | - run: mvn -B org.apache.maven.plugins:maven-dependency-plugin:3.1.1:go-offline -P ci |
22 | | - - name: Maven Build |
23 | | - run: mvn -B install site -P ci --file pom.xml |
| 61 | + - uses: actions/cache@v1 |
| 62 | + with: |
| 63 | + path: ~/.m2/repository |
| 64 | + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| 65 | + restore-keys: | |
| 66 | + ${{ runner.os }}-maven- |
| 67 | + - name: Maven Install |
| 68 | + run: mvn -B install --file pom.xml |
0 commit comments