-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (30 loc) · 1.06 KB
/
01_test_and_lint.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: "01 - Run unit tests and lint Java code"
on:
workflow_dispatch:
pull_request:
jobs:
test_and_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "corretto"
cache: "gradle"
- uses: gradle/actions/setup-gradle@v4
- run: ./gradlew test lint checkstyleMain checkstyleTest
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Publish Checkstyle report
uses: Juuxel/publish-checkstyle-report@v1
if: ${{ failure() || success() }}
with:
# required: The glob paths to report XML files as a multiline string
# The format below works for the Gradle Checkstyle plugin with default configurations
reports: |
build/reports/checkstyle/*.xml