-
Notifications
You must be signed in to change notification settings - Fork 2
86 lines (70 loc) · 2.03 KB
/
build.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: build
on: [push]
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup Java 17 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 17
- name: Install virtualenv
run: |
sudo apt update
sudo apt install python3-pip
python -m pip install virtualenv
# Cache Gradle dependencies
- name: Setup Gradle Dependencies Cache
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }}
# Cache Gradle Wrapper
- name: Setup Gradle Wrapper Cache
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
build:
needs: setup
runs-on: ubuntu-latest
steps:
# Setup Java 17 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 17
- uses: actions/checkout@v2
- run: ./gradlew build
- name: Upload Test Report
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: test-report
path: |
build/reports/tests/**/*
test:
needs: build
runs-on: ubuntu-latest
steps:
# Setup Java 17 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 17
- uses: actions/checkout@v2
- name: Run tests
run: ./gradlew test
code-style:
needs: build
runs-on: ubuntu-latest
steps:
# Setup Java 17 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 17
- uses: actions/checkout@v2
- run: ./gradlew ktlintCheck