|
1 |
| -# This workflow will build a Java project with Maven |
2 |
| -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven |
3 | 1 |
|
4 | 2 | name: Java CI with Maven
|
5 | 3 |
|
|
10 | 8 | branches: [ master ]
|
11 | 9 |
|
12 | 10 | jobs:
|
13 |
| - build: |
14 | 11 |
|
| 12 | + compile: |
15 | 13 | runs-on: ubuntu-latest
|
16 |
| - |
| 14 | + name: Running Java ${{ matrix.java }} compile |
17 | 15 | steps:
|
18 | 16 | - uses: actions/checkout@v2
|
19 | 17 | - name: Set up JDK 1.8
|
20 | 18 | uses: actions/setup-java@v1
|
21 | 19 | with:
|
22 | 20 | java-version: 1.8
|
23 |
| - |
24 | 21 | - name: Compile code
|
25 | 22 | run: mvn compile
|
26 | 23 |
|
27 |
| - - name: Run unit tests |
28 |
| - run: mvn test |
29 |
| - |
30 |
| - - name: Build with Maven |
31 |
| - run: mvn -B package --file pom.xml -Dmaven.test.skip=true |
32 |
| - |
33 |
| - - name: generate report codecov |
34 |
| - run: mvn cobertura:cobertura |
35 |
| - |
36 |
| - - name: generate report codecov |
37 |
| - run: mvn cobertura:cobertura |
| 24 | + test: |
| 25 | + runs-on: ubuntu-latest |
| 26 | + name: Running tests |
| 27 | + needs: compile |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v2 |
| 30 | + - name: Set up JDK 1.8 |
| 31 | + uses: actions/setup-java@v1 |
| 32 | + with: |
| 33 | + java-version: 1.8 |
| 34 | + - name: Run unit tests |
| 35 | + run: mvn test |
38 | 36 |
|
39 |
| - - name: Upload coverage |
40 |
| - if: success() |
41 |
| - run: | |
42 |
| - curl -s https://codecov.io/bash | bash |
43 |
| - env: |
44 |
| - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
45 |
| - shell: bash |
| 37 | + build: |
| 38 | + runs-on: ubuntu-latest |
| 39 | + name: Run mvn build and generate coverage report |
| 40 | + needs: compile |
| 41 | + steps: |
| 42 | + - uses: actions/checkout@v2 |
| 43 | + - name: Set up JDK 1.8 |
| 44 | + uses: actions/setup-java@v1 |
| 45 | + with: |
| 46 | + java-version: 1.8 |
| 47 | + - name: Build with Maven |
| 48 | + run: mvn -B package --file pom.xml -Dmaven.test.skip=true |
| 49 | + - name: generate report codecov |
| 50 | + run: mvn cobertura:cobertura |
| 51 | + - name: Upload coverage |
| 52 | + if: success() |
| 53 | + run: | |
| 54 | + curl -s https://codecov.io/bash | bash |
| 55 | + env: |
| 56 | + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 57 | + shell: bash |
46 | 58 |
|
47 |
| - - name: Upload Maven build artifact |
48 |
| - uses: actions/upload-artifact@v1 |
49 |
| - with: |
50 |
| - name: artifact |
51 |
| - path: target/workflow-github-actions-1.0-SNAPSHOT.jar |
|
0 commit comments