mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 18:00:17 +01:00
Merge pull request #6477 from BlueWallet/ubuntu-ci
TST: run e2e tests on ubuntu-latest
This commit is contained in:
commit
e296f2b80b
90
.github/workflows/ci.yml
vendored
90
.github/workflows/ci.yml
vendored
@ -12,7 +12,7 @@ on: [pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: macos-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout project
|
- name: Checkout project
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -55,10 +55,41 @@ jobs:
|
|||||||
MNEMONICS_COLDCARD: ${{ secrets.MNEMONICS_COLDCARD }}
|
MNEMONICS_COLDCARD: ${{ secrets.MNEMONICS_COLDCARD }}
|
||||||
|
|
||||||
e2e:
|
e2e:
|
||||||
runs-on: macos-13
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Free Disk Space
|
||||||
|
uses: jlumbroso/free-disk-space@main
|
||||||
|
with:
|
||||||
|
# this might remove tools that are actually needed,
|
||||||
|
# if set to "true" but frees about 6 GB
|
||||||
|
tool-cache: false
|
||||||
|
android: false
|
||||||
|
dotnet: true
|
||||||
|
haskell: true
|
||||||
|
large-packages: true
|
||||||
|
docker-images: true
|
||||||
|
swap-storage: true
|
||||||
|
|
||||||
|
- name: npm and gradle caches in /mnt
|
||||||
|
run: |
|
||||||
|
rm -rf ~/.npm
|
||||||
|
rm -rf ~/.gradle
|
||||||
|
sudo mkdir -p /mnt/.npm
|
||||||
|
sudo mkdir -p /mnt/.gradle
|
||||||
|
sudo chown -R runner /mnt/.npm
|
||||||
|
sudo chown -R runner /mnt/.gradle
|
||||||
|
ln -s /mnt/.npm /home/runner/
|
||||||
|
ln -s /mnt/.gradle /home/runner/
|
||||||
|
|
||||||
|
- name: Create artifacts directory on /mnt
|
||||||
|
run: |
|
||||||
|
sudo mkdir -p /mnt/artifacts
|
||||||
|
sudo chown -R runner /mnt/artifacts
|
||||||
|
|
||||||
- name: Specify node version
|
- name: Specify node version
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@ -84,68 +115,35 @@ jobs:
|
|||||||
${{ runner.os }}-npm-
|
${{ runner.os }}-npm-
|
||||||
|
|
||||||
- name: Install node_modules
|
- name: Install node_modules
|
||||||
run: npm install
|
run: npm install || npm install
|
||||||
|
|
||||||
- name: Use specific Java version for sdkmanager to work
|
- name: Use specific Java version for sdkmanager to work
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
|
|
||||||
|
- name: Enable KVM group perms
|
||||||
|
run: |
|
||||||
|
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||||
|
sudo udevadm control --reload-rules
|
||||||
|
sudo udevadm trigger --name-match=kvm
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run e2e:release-build
|
run: npm run e2e:release-build
|
||||||
|
|
||||||
- name: Test attempt 1
|
- name: Run tests
|
||||||
uses: reactivecircus/android-emulator-runner@v2
|
uses: reactivecircus/android-emulator-runner@v2
|
||||||
continue-on-error: true
|
|
||||||
id: test1
|
|
||||||
with:
|
with:
|
||||||
api-level: 31
|
api-level: 31
|
||||||
avd-name: Pixel_API_29_AOSP
|
avd-name: Pixel_API_29_AOSP
|
||||||
force-avd-creation: false
|
force-avd-creation: false
|
||||||
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none -partition-size 2047
|
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
|
arch: x86_64
|
||||||
script: npm run e2e:release-test
|
script: npm run e2e:release-test -- --record-videos all --record-logs all --take-screenshots all --headless -d 200000 -R 3 --artifacts-location /mnt/artifacts
|
||||||
|
|
||||||
- name: Test attempt 2
|
|
||||||
uses: reactivecircus/android-emulator-runner@v2
|
|
||||||
continue-on-error: true
|
|
||||||
id: test2
|
|
||||||
if: steps.test1.outcome != 'success'
|
|
||||||
with:
|
|
||||||
api-level: 31
|
|
||||||
avd-name: Pixel_API_29_AOSP
|
|
||||||
force-avd-creation: false
|
|
||||||
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
|
|
||||||
|
|
||||||
- name: Test attempt 3
|
|
||||||
uses: reactivecircus/android-emulator-runner@v2
|
|
||||||
continue-on-error: true
|
|
||||||
id: test3
|
|
||||||
if: steps.test1.outcome != 'success' && steps.test2.outcome != 'success'
|
|
||||||
with:
|
|
||||||
api-level: 31
|
|
||||||
avd-name: Pixel_API_29_AOSP
|
|
||||||
force-avd-creation: false
|
|
||||||
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
|
|
||||||
|
|
||||||
- name: Test attempt 4
|
|
||||||
uses: reactivecircus/android-emulator-runner@v2
|
|
||||||
if: steps.test1.outcome != 'success' && steps.test2.outcome != 'success' && steps.test3.outcome != 'success'
|
|
||||||
with:
|
|
||||||
api-level: 31
|
|
||||||
avd-name: Pixel_API_29_AOSP
|
|
||||||
force-avd-creation: false
|
|
||||||
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
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: e2e-test-videos
|
name: e2e-test-videos
|
||||||
path: ./artifacts/
|
path: /mnt/artifacts/
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
"e2e:debug-test": "detox test -c android.debug -d 200000 -l info",
|
"e2e:debug-test": "detox test -c android.debug -d 200000 -l info",
|
||||||
"e2e:debug": "(test -f android/app/build/outputs/apk/debug/app-debug.apk && test -f android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk) || npm run e2e:debug-build; npm run e2e:debug-test",
|
"e2e:debug": "(test -f android/app/build/outputs/apk/debug/app-debug.apk && test -f android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk) || npm run e2e:debug-build; npm run e2e:debug-test",
|
||||||
"e2e:release-build": "detox build -c android.release",
|
"e2e:release-build": "detox build -c android.release",
|
||||||
"e2e:release-test": "detox test -c android.release --record-videos all --record-logs all --take-screenshots all --headless -d 200000 -R 3",
|
"e2e:release-test": "detox test -c android.release",
|
||||||
"tslint": "tsc",
|
"tslint": "tsc",
|
||||||
"lint": " npm run tslint && node scripts/find-unused-loc.js && eslint --ext .js,.ts,.tsx '*.@(js|ts|tsx)' screen 'blue_modules/*.@(js|ts|tsx)' class models loc tests components",
|
"lint": " npm run tslint && node scripts/find-unused-loc.js && eslint --ext .js,.ts,.tsx '*.@(js|ts|tsx)' screen 'blue_modules/*.@(js|ts|tsx)' class models loc tests components",
|
||||||
"lint:fix": "npm run lint -- --fix",
|
"lint:fix": "npm run lint -- --fix",
|
||||||
|
Loading…
Reference in New Issue
Block a user