|
1 | | -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time |
2 | | -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven |
3 | | - |
4 | | -# This workflow uses actions that are not certified by GitHub. |
5 | | -# They are provided by a third-party and are governed by |
6 | | -# separate terms of service, privacy policy, and support |
7 | | -# documentation. |
8 | | - |
9 | | -name: Java CI with Maven |
10 | | - |
| 1 | +name: Java verification |
11 | 2 | on: |
12 | 3 | push: |
13 | | - branches: [ "main" ] |
| 4 | + branches: [main] |
14 | 5 | pull_request: |
15 | | - branches: [ "main" ] |
| 6 | + branches: [main] |
16 | 7 |
|
17 | 8 | jobs: |
18 | | - build: |
19 | | - |
| 9 | + verify: |
20 | 10 | runs-on: ubuntu-latest |
21 | | - |
22 | 11 | steps: |
23 | | - - uses: actions/checkout@v4 |
24 | | - - name: Set up JDK 17 |
25 | | - uses: actions/setup-java@v4 |
26 | | - with: |
27 | | - java-version: '17' |
28 | | - distribution: 'temurin' |
29 | | - cache: maven |
30 | | - - name: Build with Maven |
31 | | - working-directory: latte |
32 | | - run: mvn -B package --file pom.xml |
33 | | - - name: Run tests with Maven |
34 | | - working-directory: latte |
35 | | - run: mvn test --file pom.xml |
36 | | - - name: Upload test results |
37 | | - if: always() # This ensures the test results are uploaded even if tests fail |
38 | | - uses: actions/upload-artifact@v4.6.2 |
39 | | - with: |
40 | | - name: test-results |
41 | | - path: latte/latte/target/test-*.xml # Maven Surefire generates the test result files here |
42 | | - # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive |
43 | | - - name: Update dependency graph |
44 | | - run: | |
45 | | - cd latte |
46 | | - mvn com.github.ferstl:depgraph-maven-plugin:4.0.1:graph |
| 12 | + - uses: actions/checkout@v4 |
| 13 | + - uses: actions/setup-java@v4 |
| 14 | + with: |
| 15 | + java-version: '17' |
| 16 | + distribution: temurin |
| 17 | + cache: maven |
| 18 | + - name: Verify and audit upstream compatibility |
| 19 | + working-directory: latte |
| 20 | + run: mvn -B clean verify -Pcompatibility |
| 21 | + - name: Upload verification reports |
| 22 | + if: always() |
| 23 | + uses: actions/upload-artifact@v4.6.2 |
| 24 | + with: |
| 25 | + name: verification-reports |
| 26 | + path: | |
| 27 | + latte/target/surefire-reports/ |
| 28 | + latte/target/liquidjava-compatibility.json |
0 commit comments