-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63ca5b0
commit 9f04c83
Showing
1 changed file
with
64 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Run tests | ||
|
||
on: | ||
push: | ||
branches: [ main, '[0-9]*.[0-9]*.x' ] | ||
pull_request: | ||
branches: [ main, '[0-9]*.[0-9]*.x' ] | ||
workflow_dispatch: | ||
|
||
env: | ||
JDK_VERSION: 17 | ||
|
||
jobs: | ||
static-analysis: | ||
name: Static analysis | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: ${{ env.JDK_VERSION }} | ||
- name: Execute check without tests | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
arguments: check -x test | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: ${{ env.JDK_VERSION }} | ||
|
||
- name: Build | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
arguments: build -x test | ||
|
||
- name: Execute tests | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
arguments: test | ||
env: | ||
CI: Github Action | ||
|
||
- name: Publish test report | ||
uses: mikepenz/[email protected] | ||
if: always() # always run even if the previous step fails | ||
with: | ||
check_name: JUnit Test Report | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
detailed_summary: true | ||
|
||
- name: Test Summary | ||
uses: actions/[email protected] # upload test results | ||
if: always() | ||
with: | ||
name: test-results | ||
path: '**/build/test-results/test/TEST-*.xml' |