-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github check action, update forbidden-apis.
- Loading branch information
Showing
3 changed files
with
68 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: On Commit Checks | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
name: gradle check (JDK ${{ matrix.java }} on ${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
# Check on latest ubuntu with the lowest supported JDK. Everything else | ||
# is handled by subsequent nightly tests. | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
java: [ '11', '17' ] | ||
|
||
steps: | ||
- name: Correct git autocrlf | ||
run: git config --global core.autocrlf false | ||
|
||
- name: Git checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt-hotspot' | ||
java-version: ${{ matrix.java }} | ||
java-package: jdk | ||
|
||
- name: Cache/Restore Gradle files | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/jdks | ||
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('versions.lock', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle-caches- | ||
- name: Tests (./gradlew ... check) | ||
run: ./gradlew --max-workers 4 check | ||
|
||
- name: Store failed test outputs | ||
if: failure() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: failed-test-outputs | ||
path: '**/OUTPUT-*.txt' |
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