forked from BlueWallet/BlueWallet
-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (91 loc) · 3.17 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Tests
# https://dev.to/edvinasbartkus/running-react-native-detox-tests-for-ios-and-android-on-github-actions-2ekn
# https://medium.com/@reime005/the-best-ci-cd-for-react-native-with-e2e-support-4860b4aaab29
on: [pull_request]
jobs:
test:
runs-on: macos-latest
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Specify node version
uses: actions/setup-node@v2-beta
with:
node-version: 16
- name: Use npm caches
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Use node_modules caches
id: cache-nm
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-nm-${{ hashFiles('package-lock.json') }}
- name: Install node_modules
if: steps.cache-nm.outputs.cache-hit != 'true'
run: npm install
- name: Run tests
run: npm test || npm test || npm test
env:
BIP47_HD_MNEMONIC: ${{ secrets.BIP47_HD_MNEMONIC}}
HD_MNEMONIC: ${{ secrets.HD_MNEMONIC }}
HD_MNEMONIC_BIP49: ${{ secrets.HD_MNEMONIC_BIP49 }}
HD_MNEMONIC_BIP49_MANY_TX: ${{ secrets.HD_MNEMONIC_BIP49_MANY_TX }}
HD_MNEMONIC_BIP84: ${{ secrets.HD_MNEMONIC_BIP84 }}
HD_MNEMONIC_BREAD: ${{ secrets.HD_MNEMONIC_BREAD }}
FAULTY_ZPUB: ${{ secrets.FAULTY_ZPUB }}
MNEMONICS_COBO: ${{ secrets.MNEMONICS_COBO }}
MNEMONICS_COLDCARD: ${{ secrets.MNEMONICS_COLDCARD }}
e2e:
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Specify node version
uses: actions/setup-node@v2-beta
with:
node-version: 16
- name: Use gradle caches
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Use npm caches
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install node_modules
run: npm install
- name: Use specific Java version for sdkmanager to work
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
- name: Build
run: npm run e2e:release-build
- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 31
avd-name: Pixel_API_29_AOSP
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none -partition-size 2047
arch: x86_64
script: npm run e2e:release-test || npm run e2e:release-test || npm run e2e:release-test || npm run e2e:release-test
env:
TRAVIS: 1
HD_MNEMONIC: ${{ secrets.HD_MNEMONIC }}
HD_MNEMONIC_BIP84: ${{ secrets.HD_MNEMONIC_BIP84 }}
- uses: actions/upload-artifact@v2
if: failure()
with:
name: e2e-test-videos
path: ./artifacts/