|
8 | 8 | paths:
|
9 | 9 | - 'assertj-core/**'
|
10 | 10 |
|
| 11 | +env: |
| 12 | + MAVEN_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always -DskipTests |
| 13 | + |
11 | 14 | jobs:
|
12 | 15 | verify-with-base:
|
13 | 16 | name: Verify with target branch
|
14 | 17 | runs-on: ubuntu-latest
|
15 | 18 | if: github.base_ref != null
|
16 | 19 |
|
17 | 20 | steps:
|
18 |
| - - uses: actions/checkout@v3 |
19 |
| - - uses: actions/setup-java@v3 |
| 21 | + - uses: actions/checkout@v4 |
| 22 | + - uses: actions/setup-java@v4 |
20 | 23 | with:
|
21 | 24 | distribution: 'zulu'
|
22 |
| - java-version: 17 |
| 25 | + java-version: '21' |
23 | 26 | cache: 'maven'
|
24 | 27 |
|
25 | 28 | - name: Checkout `${{ github.base_ref }}` into subfolder
|
26 |
| - uses: actions/checkout@v3 |
| 29 | + uses: actions/checkout@v4 |
27 | 30 | with:
|
28 | 31 | ref: ${{ github.base_ref }}
|
29 | 32 | path: ${{ github.run_id }}.${{ github.base_ref }}
|
30 | 33 | - name: Build `${{ github.base_ref }}`
|
31 |
| - run: > |
32 |
| - ./mvnw -B -V --no-transfer-progress -e -f ${{ github.run_id }}.${{ github.base_ref }}/assertj-core/pom.xml package |
33 |
| - -DskipTests |
34 |
| - -Djansi.passthrough=true |
35 |
| - -Dstyle.color=always |
| 34 | + run: ./mvnw $MAVEN_ARGS -f ${{ github.run_id }}.${{ github.base_ref }}/assertj-core/pom.xml package |
36 | 35 | - name: Compare `${{ github.head_ref }}` with `${{ github.base_ref }}`
|
37 | 36 | run: >
|
38 |
| - ./mvnw -B -V --no-transfer-progress -e -f assertj-core/pom.xml -Pjapicmp-branch package japicmp:cmp |
39 |
| - -DskipTests |
| 37 | + ./mvnw $MAVEN_ARGS -f assertj-core/pom.xml -Pjapicmp-branch package japicmp:cmp |
40 | 38 | -Djapicmp.breakBuildOnBinaryIncompatibleModifications=true
|
41 | 39 | -Djapicmp.oldVersion.basedir=${{ github.run_id }}.${{ github.base_ref }}/assertj-core
|
42 |
| - -Djansi.passthrough=true |
43 |
| - -Dstyle.color=always |
44 |
| -
|
45 |
| - - name: Add label |
46 |
| - if: failure() |
47 |
| - uses: actions/github-script@v6 |
48 |
| - continue-on-error: true |
49 |
| - with: |
50 |
| - script: | |
51 |
| - github.rest.issues.addLabels({ |
52 |
| - owner: context.repo.owner, |
53 |
| - repo: context.repo.repo, |
54 |
| - issue_number: context.issue.number, |
55 |
| - labels: ['binary incompatible with: base'] |
56 |
| - }) |
57 |
| -
|
58 |
| - - name: Remove label |
59 |
| - if: success() |
60 |
| - uses: actions/github-script@v6 |
61 |
| - continue-on-error: true |
62 |
| - with: |
63 |
| - script: | |
64 |
| - github.rest.issues.removeLabel({ |
65 |
| - owner: context.repo.owner, |
66 |
| - repo: context.repo.repo, |
67 |
| - issue_number: context.issue.number, |
68 |
| - name: 'binary incompatible with: base' |
69 |
| - }) |
70 | 40 |
|
71 | 41 | - name: Add result to job summary
|
72 | 42 | if: success() || failure()
|
73 | 43 | run: |
|
74 | 44 | echo '```' >> $GITHUB_STEP_SUMMARY
|
75 | 45 | cat assertj-core/target/japicmp/default-cli.diff >> $GITHUB_STEP_SUMMARY
|
76 |
| - - name: Upload reports |
77 |
| - if: success() || failure() |
78 |
| - uses: actions/upload-artifact@v3 |
79 |
| - with: |
80 |
| - name: japicmp |
81 |
| - path: assertj-core/target/japicmp |
82 |
| - if-no-files-found: error |
83 | 46 |
|
84 | 47 | verify-with-release:
|
85 | 48 |
|
86 | 49 | name: Verify with latest release
|
87 | 50 | runs-on: ubuntu-latest
|
88 | 51 |
|
89 | 52 | steps:
|
90 |
| - - uses: actions/checkout@v3 |
91 |
| - - uses: actions/setup-java@v3 |
| 53 | + - uses: actions/checkout@v4 |
| 54 | + - uses: actions/setup-java@v4 |
92 | 55 | with:
|
93 | 56 | distribution: 'zulu'
|
94 |
| - java-version: 17 |
| 57 | + java-version: '21' |
95 | 58 | cache: 'maven'
|
96 | 59 |
|
97 | 60 | - name: Compare with the latest release
|
98 | 61 | run: >
|
99 |
| - ./mvnw -B -V --no-transfer-progress -e -f assertj-core/pom.xml package japicmp:cmp |
100 |
| - -DskipTests |
| 62 | + ./mvnw $MAVEN_ARGS -f assertj-core/pom.xml package japicmp:cmp |
101 | 63 | -Djapicmp.breakBuildOnBinaryIncompatibleModifications=true
|
102 |
| - -Djansi.passthrough=true |
103 |
| - -Dstyle.color=always |
104 |
| -
|
105 |
| - - name: Add label |
106 |
| - if: github.base_ref != null && failure() |
107 |
| - uses: actions/github-script@v6 |
108 |
| - with: |
109 |
| - script: | |
110 |
| - github.rest.issues.addLabels({ |
111 |
| - owner: context.repo.owner, |
112 |
| - repo: context.repo.repo, |
113 |
| - issue_number: context.issue.number, |
114 |
| - labels: ['binary incompatible with: release'] |
115 |
| - }) |
116 |
| - - name: Remove label |
117 |
| - if: github.base_ref != null && success() |
118 |
| - uses: actions/github-script@v6 |
119 |
| - continue-on-error: true |
120 |
| - with: |
121 |
| - script: | |
122 |
| - github.rest.issues.removeLabel({ |
123 |
| - owner: context.repo.owner, |
124 |
| - repo: context.repo.repo, |
125 |
| - issue_number: context.issue.number, |
126 |
| - name: 'binary incompatible with: release' |
127 |
| - }) |
128 | 64 |
|
129 | 65 | - name: Add result to job summary
|
130 | 66 | if: success() || failure()
|
|
133 | 69 | cat assertj-core/target/japicmp/default-cli.diff >> $GITHUB_STEP_SUMMARY
|
134 | 70 | - name: Upload reports
|
135 | 71 | if: success() || failure()
|
136 |
| - uses: actions/upload-artifact@v3 |
| 72 | + uses: actions/upload-artifact@v4 |
137 | 73 | with:
|
138 | 74 | name: japicmp
|
139 | 75 | path: assertj-core/target/japicmp
|
|
0 commit comments