This repository has been archived by the owner on Nov 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
87 lines (71 loc) · 2.42 KB
/
android_check.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
87
#
# Copyright (c) 2020 INESC TEC <https://www.inesctec.pt>
#
# This Source Code Form is subject to the terms of the European Union
# Public License, v. 1.2. If a copy of the EUPL was not distributed with
# this file, You can obtain one at https://opensource.org/licenses/EUPL-1.2.
#
# SPDX-License-Identifier: EUPL-1.2
#
name: Android Check Build
on:
pull_request:
branches:
- master
paths-ignore:
- "docs/**"
- "locales/**"
- "**/*.md"
- "LICENSE"
env:
ANDROID_NDK_VERSION: "21.3.6528147"
jobs:
test:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip-ci]')"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-node@v1
with:
node-version: "10"
- uses: actions/setup-java@v1
with:
java-version: "8"
java-package: "jdk"
architecture: "x64"
- name: Get node cache directory path
id: node-cache-dir
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: node-cache
name: Cache node dependencies
with:
path: ${{ steps.node-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-node-
- uses: actions/cache@v2
id: gradle-cache
name: Cache gradle
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Install node dependencies
run: yarn --ignore-scripts --no-audit --prefer-offline --frozen-lockfileyarn --ignore-scripts --frozen-lockfile
- name: Setup environment
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;${{ env.ANDROID_NDK_VERSION }}"
wget https://github.com/google/exposure-notifications-android/raw/2fdb58ceb6399ba1e30436c9cf9f6d08a8e9b53a/app/libs/play-services-nearby-exposurenotification-1.7.2-eap.aar -P android/app/libs
cp .env.example android/.env
- name: Run unit tests
run: yarn test:unit
- name: Run integration tests
run: yarn test:integration
- name: Run components tests
run: yarn test:components
- name: Build APK
run: |
cd android
./gradlew assembleProductionRelease