-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathandroid-master-pull-request.yml
More file actions
42 lines (35 loc) · 1.27 KB
/
Copy pathandroid-master-pull-request.yml
File metadata and controls
42 lines (35 loc) · 1.27 KB
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
name: Android Pull Request CI
on:
pull_request:
branches: [ master ]
jobs:
check:
name: Run test and lint check
runs-on: ubuntu-latest
env:
GOOGLE_SERVICE_JSON: ${{ secrets.GOOGLE_SERVICE_JSON }}
KEYSTORE_PROPERTIES_FILE: "${{ secrets.KEYSTORE_PROPERTIES_FILE }}"
KEYSTORE_FILE: "${{ secrets.KEYSTORE_FILE }}"
steps:
# Step 1: Clone repo and setup JDK
- name: Clone Repo
uses: actions/checkout@v2.3.4
- name: Setup JDK 1.8
uses: actions/setup-java@v2.0.0
with:
distribution: 'adopt'
java-version: '8'
check-latest: false
# Step 2: Decode Google services configuration file
- name: Decode google-services.json
run: echo $GOOGLE_SERVICE_JSON > app-kinofilm/google-services.json
# Step 3: Decode keystore.properties and keystore.jks file
- name: Decode keystore.properties
run: |
mkdir ./keystore
echo $KEYSTORE_PROPERTIES_FILE | base64 --decode > ./keystore/keystore.properties
- name: Decode keystore.jks
run: echo $KEYSTORE_FILE | base64 --decode > ./keystore/keystore.jks
# Step 4: Run lint, ktlint, detekt and test
- name: Run Checks
run: bash ./gradlew check --stacktrace