-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (47 loc) · 1.48 KB
/
ci.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
name: CI
on:
push:
branches:
- main
tags-ignore:
- heo-*
pull_request:
jobs:
ci:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: graalvm/setup-graalvm@v1
with:
java-version: '21' # See 'Options' section below for all supported versions
distribution: 'graalvm' # See 'Options' section below for all available distributions
- name: Check Gradle Version
run: |
chmod +x gradlew
./gradlew --version
- name: Test task with Gradle Wrapper
run: |
./gradlew --parallel --max-workers=4 build
- name: Create report file
if: success()
run: |
sudo apt install -y graphviz
JAR_FILE=$(ls -al ./build/libs/ | tail -1 | awk '{print $9}')
java -jar ./build/libs/$JAR_FILE -d $(pwd) -p com.heowc.heo.core -o ${{ github.event.pull_request.number }}.png
- name: Create self-healing test report
if: success() && github.event.pull_request.number != ''
uses: actions/upload-artifact@v4
with:
path: ${{ github.event.pull_request.number }}.png
name: interg-reports
retention-days: 7
- name: If failure then upload test reports
if: failure()
uses: actions/upload-artifact@v4
with:
path: '*/build/reports/tests'
name: test-reports
retention-days: 7