-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (50 loc) · 1.68 KB
/
build_and_test.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: Build and Test
on:
push:
branches:
- 'master'
- 'develop'
- 'feature/**'
- 'release/**'
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Create services json file
run: cat /home/runner/work/reminder-kotlin/reminder-kotlin/app/google-services.json | base64
- name: Put data into services json file
env:
DATA: ${{ secrets.GOOGLE_SERVICES }}
run: echo $DATA > /home/runner/work/reminder-kotlin/reminder-kotlin/app/google-services.json
- name: Analyse code with ktlint
uses: ScaCap/action-ktlint@master
with:
github_token: ${{ secrets.github_token }}
reporter: github-check
android: true
fail_on_error: true
ktlint_version: 0.47.1
- name: Upload iCalendar module Test results
uses: actions/upload-artifact@v4
if: ${{ always() }} # IMPORTANT: Upload reports regardless of status
with:
name: iCalendar_reports
path: icalendar/build/test-results # path to where the xml test results are stored
- name: Run tests for Main module
run: ./gradlew testProDebugUnitTest
- name: Upload Main module Test results
uses: actions/upload-artifact@v4
if: ${{ always() }} # IMPORTANT: Upload reports regardless of status
with:
name: reports
path: app/build/test-results # path to where the xml test results are stored