-
-
Notifications
You must be signed in to change notification settings - Fork 25
88 lines (74 loc) · 2.42 KB
/
ci.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
88
name: ci
on:
workflow_dispatch:
push:
tags-ignore:
- '**'
paths-ignore:
- ".github/**"
- "README.md"
- ".gitignore"
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
env:
LIBSYSCONFCPUS: 8
JOBS: 8
BUILDTYPE: Release
IS_LOCAL_DEVELOPMENT: false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Download Dependencies
run: ./gradlew androidDependencies
- name: Run nitpick
run: ./gradlew plugin-annotation:nitpick
- name: Check Java code style
run: make checkstyle
- name: Build Plugins SDK
run: make build-release
- name: Run unit tests
run: make test
- name: Generate Activity Sanity tests
run: make generate-sanity-test
- name: Build testapp APK
run: |
./gradlew accessToken
./gradlew app:assembleDebug
env:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
- name: Build Test APK
run: |
./gradlew app:assembleAndroidTest
- name: Build release to test ProGuard rules
run: ./gradlew app:assembleRelease
# https://cloud.google.com/iam/docs/creating-managing-service-account-keys
- name: Log in to Google Cloud Platform
run: |
GLCLOUD_SERVICE_JSON='${{ secrets.GLCLOUD_SERVICE_JSON }}'
if [ -n "${GCLOUD_SERVICE_ACCOUNT_JSON}" ]; then
echo "${GCLOUD_SERVICE_ACCOUNT_JSON}" > secret.json
gcloud auth activate-service-account --key-file secret.json --project maptiler-gl-mobile
rm secret.json
fi
- name: Run instrumentation tests on Firebase
run: |
GLCLOUD_SERVICE_JSON='${{ secrets.GLCLOUD_SERVICE_JSON }}'
if [ -n "${GCLOUD_SERVICE_ACCOUNT_JSON}" ]; then
gcloud firebase test android models list
gcloud firebase test android run --type instrumentation \
--app app/build/outputs/apk/debug/app-debug.apk \
--test app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
--device-ids sailfish --os-version-ids 26 --locales en --orientations portrait --timeout 20m
fi