-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (60 loc) · 1.9 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
49
50
51
52
53
54
55
56
57
58
59
60
61
name: CI
on:
push:
branches:
- main
tags-ignore:
- heo-*
pull_request:
jobs:
ci:
permissions:
pull-requests: write
strategy:
matrix:
os: [ macos-latest, ubuntu-latest ]
version: [ 17, 21 ]
runs-on: ${{ matrix.os }}
name: ci-${{ matrix.os }}-jdk-${{ matrix.version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ matrix.version }}
distribution: 'graalvm'
- name: Check Gradle Version
run: |
chmod +x gradlew
./gradlew --version
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v2
- name: Test
run: |
./gradlew --parallel --max-workers=4 build
- name: Plugin Test
run: |
./gradlew :heo-gradle-plugin:publishToMavenLocal
./gradlew --debug -PlocalPlugin pluginTest
- name: Create self report file
if: success()
run: |
JAR_FILE=$(ls -al ./heo-cli/build/libs/ | tail -1 | awk '{print $9}')
java -jar ./heo-cli/build/libs/$JAR_FILE \
-d $(pwd) \
-p dev.heowc.heo.core \
-o interg-report.png
- name: Upload self report file
if: success() && github.event.pull_request.number != ''
uses: actions/upload-artifact@v4
with:
path: interg-report.png
name: interg-reports-${{ github.event.pull_request.number }}-${{ github.run_id }}-${{ matrix.os }}-jdk-${{ matrix.version }}
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-${{ github.event.pull_request.number }}-${{ github.run_id }}-${{ matrix.os }}-jdk-${{ matrix.version }}
retention-days: 7