Skip to content

Commit 0d7c474

Browse files
committed
Merge branch 'refs/heads/3.x' into pr/assertjgh-2823
# Conflicts: # assertj-tests/assertj-integration-tests/assertj-core-kotlin/src/test/kotlin/org/assertj/core/tests/kotlin/Assertions_describedAs_text_supplier_Test.kt
2 parents f261e8e + cdd865d commit 0d7c474

File tree

5,129 files changed

+30174
-17478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,129 files changed

+30174
-17478
lines changed

.github/FUNDING.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: [joel-costigliola, scordio]
2+
tidelift: maven/org.assertj:assertj-core

.github/workflows/binary-compatibility.yml

+14-78
Original file line numberDiff line numberDiff line change
@@ -8,123 +8,59 @@ on:
88
paths:
99
- 'assertj-core/**'
1010

11+
env:
12+
MAVEN_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always -DskipTests
13+
1114
jobs:
1215
verify-with-base:
1316
name: Verify with target branch
1417
runs-on: ubuntu-latest
1518
if: github.base_ref != null
1619

1720
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-java@v3
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-java@v4
2023
with:
2124
distribution: 'zulu'
22-
java-version: 17
25+
java-version: '21'
2326
cache: 'maven'
2427

2528
- name: Checkout `${{ github.base_ref }}` into subfolder
26-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
2730
with:
2831
ref: ${{ github.base_ref }}
2932
path: ${{ github.run_id }}.${{ github.base_ref }}
3033
- 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
3635
- name: Compare `${{ github.head_ref }}` with `${{ github.base_ref }}`
3736
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
4038
-Djapicmp.breakBuildOnBinaryIncompatibleModifications=true
4139
-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-
})
7040
7141
- name: Add result to job summary
7242
if: success() || failure()
7343
run: |
7444
echo '```' >> $GITHUB_STEP_SUMMARY
7545
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
8346
8447
verify-with-release:
8548

8649
name: Verify with latest release
8750
runs-on: ubuntu-latest
8851

8952
steps:
90-
- uses: actions/checkout@v3
91-
- uses: actions/setup-java@v3
53+
- uses: actions/checkout@v4
54+
- uses: actions/setup-java@v4
9255
with:
9356
distribution: 'zulu'
94-
java-version: 17
57+
java-version: '21'
9558
cache: 'maven'
9659

9760
- name: Compare with the latest release
9861
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
10163
-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-
})
12864
12965
- name: Add result to job summary
13066
if: success() || failure()
@@ -133,7 +69,7 @@ jobs:
13369
cat assertj-core/target/japicmp/default-cli.diff >> $GITHUB_STEP_SUMMARY
13470
- name: Upload reports
13571
if: success() || failure()
136-
uses: actions/upload-artifact@v3
72+
uses: actions/upload-artifact@v4
13773
with:
13874
name: japicmp
13975
path: assertj-core/target/japicmp

.github/workflows/cross-version.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,25 @@ name: Cross-Version
22

33
on: [push, pull_request]
44

5+
env:
6+
MAVEN_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always -Djacoco.skip=true
7+
58
jobs:
69

710
test_java:
811
name: Java ${{ matrix.java }}
912
strategy:
1013
fail-fast: false
1114
matrix:
12-
java: [19, 20, 21]
15+
java: [22, 23]
1316
runs-on: ubuntu-latest
1417
steps:
15-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1619
- name: Setup Java
1720
uses: oracle-actions/setup-java@v1
1821
with:
1922
website: jdk.java.net
2023
release: ${{ matrix.java }}
2124
version: latest
2225
- name: Test
23-
run: >
24-
./mvnw -B -V --no-transfer-progress -e verify javadoc:javadoc
25-
-Djacoco.skip=true
26-
-Djansi.passthrough=true
27-
-Dstyle.color=always
26+
run: ./mvnw $MAVEN_ARGS verify
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Dependency Graph
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
10+
dependency_graph:
11+
12+
name: Update
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: 'zulu'
21+
java-version: '21'
22+
cache: 'maven'
23+
- name: Update dependency graph
24+
uses: advanced-security/maven-dependency-submission-action@v4

.github/workflows/main.yml

+29-32
Original file line numberDiff line numberDiff line change
@@ -2,72 +2,69 @@ name: CI
22

33
on: [push, pull_request]
44

5+
env:
6+
MAVEN_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always
7+
58
jobs:
69

710
test_os:
11+
812
name: OS ${{ matrix.os }}
9-
permissions:
10-
# Needed for test reporting
11-
checks: write
12-
pull-requests: write
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
include:
17-
- os: ubuntu-latest
18-
comment-test-results: true
19-
- os: macOS-latest
20-
comment-test-results: false
21-
- os: windows-latest
22-
comment-test-results: false
16+
os: [ubuntu-latest, macOS-latest, windows-latest]
2317
runs-on: ${{ matrix.os }}
18+
2419
steps:
25-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2621
- name: Setup Java
27-
uses: actions/setup-java@v3
22+
uses: actions/setup-java@v4
2823
with:
2924
distribution: 'zulu'
30-
java-version: 17
25+
java-version: '21'
3126
cache: 'maven'
3227
- name: Test
33-
# Note: arguments with a period or bang in them have to be single quoted to prevent
34-
# confusing the PowerShell instance on Windows runners.
35-
run: >
36-
./mvnw -B -V --no-transfer-progress -e verify javadoc:javadoc
37-
'-Djansi.passthrough=true'
38-
'-Dstyle.color=always'
28+
run: ./mvnw $MAVEN_ARGS verify
29+
30+
javadoc:
3931

40-
- name: Publish unit test results
41-
uses: EnricoMi/publish-unit-test-result-action@v2
42-
if: ${{ matrix.comment-test-results }}
43-
continue-on-error: true
32+
name: Javadoc
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Set up Java
38+
uses: actions/setup-java@v4
4439
with:
45-
check_name: "JUnit test results"
46-
junit_files: "assertj*/**/target/surefire-reports/TEST-*.xml"
40+
distribution: 'zulu'
41+
java-version: '21'
42+
cache: 'maven'
43+
- name: Generate Javadoc
44+
run: ./mvnw $MAVEN_ARGS -DskipTests package javadoc:javadoc
4745

4846
sonar:
47+
4948
name: Sonar code analysis
5049
runs-on: ubuntu-latest
5150
if: github.repository == 'assertj/assertj' && github.event_name == 'push'
5251

5352
steps:
54-
- uses: actions/checkout@v3
53+
- uses: actions/checkout@v4
5554
with:
5655
fetch-depth: 0
5756
- name: Setup Java
58-
uses: actions/setup-java@v3
57+
uses: actions/setup-java@v4
5958
with:
6059
distribution: 'zulu'
61-
java-version: 17
60+
java-version: '21'
6261
cache: 'maven'
6362
- name: Test with Sonar
6463
run: >
65-
./mvnw -B -V --no-transfer-progress -e verify javadoc:javadoc sonar:sonar
64+
./mvnw $MAVEN_ARGS verify sonar:sonar
6665
-Dsonar.host.url=https://sonarcloud.io
6766
-Dsonar.organization=assertj
6867
-Dsonar.projectKey=joel-costigliola_assertj-core
69-
-Djansi.passthrough=true
70-
-Dstyle.color=always
7168
env:
7269
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7370
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/pitest-receive-pr.yml

+9-10
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ name: Receive
1515
on:
1616
pull_request:
1717

18+
env:
19+
MAVEN_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always
20+
1821
jobs:
1922
store-pitest-feedback:
2023
# Only run on forked repos.
@@ -23,32 +26,28 @@ jobs:
2326

2427
steps:
2528
- name: Checkout project
26-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
2730
with:
2831
# important to set a fetch depth of 2. By default the checkout action make no history available
2932
fetch-depth: 2
3033

3134
- name: Setup Java
32-
uses: actions/setup-java@v3
35+
uses: actions/setup-java@v4
3336
with:
3437
distribution: 'zulu'
35-
java-version: 17
38+
java-version: '21'
3639
cache: 'maven'
3740
- name: run pitest
3841
# pitest has been bound to a profile called pitest for normal running
3942
# we add config to analyse only changes made within a PR and treat surviving mutants as check errors
4043
# failWhenNoMutations is unset in the pom, as otherwise PRs that do not affect java code would fail
4144
run: >
42-
mvn -B -e -Ppitest -Dfeatures="+GIT(from[HEAD~1]), +gitci" test
43-
-Djansi.passthrough=true
44-
-Dstyle.color=always
45+
./mvnw $MAVEN_ARGS -Ppitest -Dfeatures="+GIT(from[HEAD~1]), +gitci" test
4546
- name: aggregate files
4647
run: >
47-
mvn -B -e -f assertj-core/pom.xml -Ppitest pitest-git:aggregate
48-
-Djansi.passthrough=true
49-
-Dstyle.color=always
48+
./mvnw $MAVEN_ARGS -f assertj-core/pom.xml -Ppitest pitest-git:aggregate
5049
- name: upload results
51-
uses: actions/upload-artifact@v3
50+
uses: actions/upload-artifact@v4
5251
with:
5352
name: pitest
5453
path: target/assertj-core/pit-reports-ci/

.github/workflows/pitest-updated-pr.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,23 @@ on:
1919
types:
2020
- completed
2121

22+
env:
23+
MAVEN_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always
24+
2225
jobs:
2326
pitest-update-pr:
2427
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2528
runs-on: ubuntu-latest
2629
steps:
2730
- name: debug
28-
uses: hmarr/debug-action@v2
31+
uses: hmarr/debug-action@v3
2932
- name: Setup Java
30-
uses: actions/setup-java@v3
33+
uses: actions/setup-java@v4
3134
with:
3235
distribution: 'zulu'
33-
java-version: 17
36+
java-version: '21'
3437
- name: Download artifact
35-
uses: dawidd6/action-download-artifact@v2
38+
uses: dawidd6/action-download-artifact@v3
3639
with:
3740
workflow: ${{ github.event.workflow_run.workflow_id }}
3841
name: pitest
@@ -43,6 +46,4 @@ jobs:
4346
# the code, but does mean the version here must be maintained. An alternative would be to checkout the code and use
4447
# the github goal. This will work as long as the artifact is extracted to the maven target directory
4548
run: >
46-
mvn -B -DrepoToken=${{ secrets.GITHUB_TOKEN }} com.groupcdg:pitest-github-maven-plugin:1.0.3:updatePR
47-
-Djansi.passthrough=true
48-
-Dstyle.color=always
49+
./mvnw $MAVEN_ARGS -DrepoToken=${{ secrets.GITHUB_TOKEN }} com.groupcdg:pitest-github-maven-plugin:1.1.1:updatePR

0 commit comments

Comments
 (0)