-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 1.67 KB
/
check.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Check
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build and test with Gradle
run: ./gradlew clean check
# https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
report_paths: 'build/test-results/*/*.xml'
check_name: 'JUnit test report (gradle)'
require_passed_tests: true
maven:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Maven
uses: s4u/[email protected]
with:
java-version: 17
java-distribution: temurin
maven-version: 3.9.0
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Generate sources with Gradle
run: ./gradlew regenerateSources
- name: Build and test with Maven
run: mvn clean verify # -Dmaven.test.failure.ignore=true
# https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
report_paths: 'target/surefire-reports/*.xml'
check_name: 'JUnit test report (maven)'
require_passed_tests: true