-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub workflow for checking API compatibility
- Loading branch information
1 parent
517d3b1
commit db82555
Showing
5 changed files
with
87 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Check API compatibility | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
check-api-compatibility: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout old version | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.base.sha }} | ||
path: 'gson-old-japicmp' | ||
|
||
- name: Checkout new version | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
cache: 'maven' | ||
|
||
- name: Build old version | ||
run: | | ||
cd gson-old-japicmp | ||
# Set dummy version | ||
mvn --batch-mode org.codehaus.mojo:versions-maven-plugin:2.11.0:set -DnewVersion=JAPICMP-OLD | ||
# Install artifacts with dummy version in local repository; used later by Maven plugin for comparison | ||
mvn --batch-mode install -DskipTests | ||
- name: Check API compatibility | ||
run: | | ||
mvn --batch-mode --fail-at-end package japicmp:cmp -DskipTests | ||
- name: Upload API differences artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: api-differences | ||
path: | | ||
**/target/japicmp/default-cli.html | ||
**/target/japicmp/default-cli.diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters