fix: validate node ids to avoid crash #440
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: mocha-ios | |
env: | |
NO_FLIPPER: 1 | |
on: | |
pull_request: | |
branches: | |
- 'master' | |
push: | |
branches: | |
- 'master' | |
jobs: | |
mocha-ios: | |
runs-on: macos-13 | |
timeout-minutes: 120 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Setup Docker Colima 1 | |
uses: douglascamata/[email protected] | |
id: docker1 | |
continue-on-error: true | |
with: | |
lima: v0.18.0 | |
colima: v0.5.6 | |
- name: Setup Docker Colima 2 | |
if: steps.docker1.outcome != 'success' | |
uses: douglascamata/[email protected] | |
id: docker2 | |
with: | |
lima: v0.18.0 | |
colima: v0.5.6 | |
- name: Install backup-server dependencies | |
working-directory: backup-server | |
run: npm i || npm i | |
- name: Run regtest setup | |
working-directory: example/docker | |
run: | | |
mkdir lnd | |
mkdir clightning | |
chmod 777 lnd clightning | |
docker-compose up -d --quiet-pull | |
- name: Wait for electrum server | |
timeout-minutes: 2 | |
run: while ! nc -z '127.0.0.1' 60001; do sleep 1; done | |
- name: Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'yarn' # cache packages, but not node_modules | |
cache-dependency-path: 'example/yarn.lock' | |
- name: Install lib dependencies | |
working-directory: lib | |
run: yarn || yarn | |
- name: Build lib | |
working-directory: lib | |
run: yarn build | |
- name: Install Dependencies | |
working-directory: example | |
run: (yarn || yarn) && yarn rn-setup | |
- name: Cache Pods | |
uses: actions/cache@v4 | |
with: | |
path: example/ios/Pods | |
key: pods-${{ hashFiles('**/Podfile.lock') }} | |
- name: Install pods | |
working-directory: example | |
run: | | |
gem update cocoapods xcodeproj | |
pod install --project-directory=ios | |
- name: Install applesimutils | |
run: | | |
brew tap wix/brew | |
brew install applesimutils | |
- name: Build | |
working-directory: example | |
run: npx react-native run-ios --no-packager --simulator='iPhone 14' | |
- name: Test iOS app | |
working-directory: example | |
run: yarn test:mocha:ios | |
- name: Prepare articrafts | |
# if: failure() | |
run: | | |
mkdir articrafts | |
find /Users/runner/Library/Developer/CoreSimulator/Devices/ -path '*Documents/ldk' -exec cp -r "{}" articrafts/ \; | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ldk-data | |
path: articrafts |