-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (49 loc) · 1.46 KB
/
run_tests.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: X-Road-Catalog tests
on:
# Capture this event so that gradle caches are updated when a PR is merged to develop
# More information on why: https://github.com/gradle/gradle-build-action#using-the-caches-read-only
push:
branches:
- develop
paths:
- 'xroad-catalog-collector/src/**'
- 'xroad-catalog-lister/src/**'
- 'xroad-catalog-persistence/src/**'
- '.github/**'
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'xroad-catalog-collector/src/**'
- 'xroad-catalog-lister/src/**'
- 'xroad-catalog-persistence/src/**'
- '.github/**'
jobs:
Test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
gradle-home-cache-cleanup: true
- name: Run tests
run: ./gradlew test
- name: Test report
env:
NODE_OPTIONS: '--max-old-space-size=6144'
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Test results
path: ./**/build/test-results/**/TEST-*.xml
reporter: java-junit
list-suites: 'failed'
list-tests: 'failed'