-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.48 KB
/
pull_request.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: 'Pull Request Build'
concurrency:
group: ${{ github.event.branch }}-${{ github.event.number }}
on:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review, labeled ]
branches:
- main
permissions:
pull-requests: write
deployments: write
checks: write
statuses: write
contents: write
jobs:
build:
if: ${{ !github.event.pull_request.draft }}
name: Build Project
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '18'
distribution: 'temurin'
cache: 'gradle'
- name: Cache gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build run tests
run: >-
./gradlew
jvmTest
# jsTest
# iosTest
- name: Bundle the failed build report
if: failure()
run: find ./build -type d -name 'reports' | zip -@ -r build-reports.zip
- name: Upload the failed build report
if: failure()
uses: actions/upload-artifact@v2
with:
name: error-report
path: build-reports.zip
retention-days: 7