-
Notifications
You must be signed in to change notification settings - Fork 14
128 lines (111 loc) · 4.52 KB
/
Copy pathci.yml
File metadata and controls
128 lines (111 loc) · 4.52 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: CI
on:
pull_request:
concurrency:
# Limit concurrency to 1 for PRs. 'main' concurrency isn't limited.
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CI: true
JAVA_VERSION: 17
jobs:
compile-check:
name: Compile check (no creds required)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Java env
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'corretto'
cache: 'gradle'
- name: Gradle build cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches/build-cache-1
.gradle/configuration-cache
key: gradle-build-cache-${{ hashFiles('**/*.gradle.kts', 'gradle.properties') }}
restore-keys: |
gradle-build-cache-
# compileDebugSources runs all Kotlin/Java compilation tasks but stops before
# processDebugGoogleServices (which needs secrets). This catches KMP interop
# regressions (missing @JvmStatic, internal visibility leaking across modules)
# that only surface when consumers try to compile against the shared library.
- name: Compile app sources
run: ./gradlew :apps:flipcash:app:compileDebugSources --continue --no-daemon
flipcash-tests:
name: Run Flipcash Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Java env
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'corretto'
cache: 'gradle'
- name: Gradle build cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches/build-cache-1
.gradle/configuration-cache
key: gradle-build-cache-${{ hashFiles('**/*.gradle.kts', 'gradle.properties') }}
restore-keys: |
gradle-build-cache-
- name: Setup Ruby env
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
bundler-cache: true
- name: Decode Google Services JSON file
uses: timheuer/base64-to-file@v1
id: google_services_json_file
with:
fileName: google-services.json
fileDir: ./apps/flipcash/app/src
encodedString: ${{ secrets.FLIPCASH2_GOOGLE_SERVICES }}
- name: Setup BugSnag API Key
run: echo BUGSNAG_API_KEY=\"${{ secrets.FLIPCASH_BUGSNAG_API_KEY }}\" > ./local.properties
- name: Setup Google Cloud Project Number
run: echo GOOGLE_CLOUD_PROJECT_NUMBER=${{ secrets.GOOGLE_CLOUD_PROJECT_NUMBER }} >> ./local.properties
- name: Setup Mixpanel API Key
run: echo MIXPANEL_API_KEY=\"${{ secrets.FLIPCASH_MIXPANEL_API_KEY }}\" >> ./local.properties
- name: Setup Coinbase OnRamp API Key
run: echo COINBASE_ONRAMP_API_KEY=${{ secrets.COINBASE_ONRAMP_API_KEY }} >> ./local.properties
- name: Run Flipcash tests
run: bundle exec fastlane android flipcash_tests
env:
SKIP_COVERAGE: "true"
# TODO(cross-platform-vectors): wire instrumented vector tests once this CI has emulator support.
#
# Three androidTest suites require a device/emulator (JNI or Android-framework deps):
# - :libs:encryption:ed25519 connectedAndroidTest (JNI + android.util.Base64)
# - :libs:encryption:mnemonic connectedAndroidTest (wordlist in res/raw + JNI ed25519)
# - :libs:currency-math connectedAndroidTest (loads .bin tables from assets)
#
# To add: create a new job (e.g. `vector-instrumented-tests`) with:
# runs-on: ubuntu-latest # or macos-latest (faster KVM on Linux)
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-java@v3 (java-version: '21', distribution: 'corretto')
# - uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 35 # matches compileSdk in build-logic convention plugins
# arch: x86_64
# script: >
# ./gradlew
# :libs:encryption:ed25519:connectedAndroidTest
# :libs:encryption:mnemonic:connectedAndroidTest
# :libs:currency-math:connectedAndroidTest
# --no-daemon
#
# The host-JVM vector suites (base58, solana_message, compact_message) are already covered by
# the flipcash-tests job above via `flipcashTestDebug` → :libs:encryption:base58 and
# :services:opencode are now in unitTestPaths (see settings.gradle.kts).