Skip to content

Commit

Permalink
Update JS deps and add GitHub actions workflow for react-native (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdlaver authored Oct 25, 2024
1 parent 4096a2b commit c178b79
Show file tree
Hide file tree
Showing 6 changed files with 2,178 additions and 1,147 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/react-native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: React-Native CI

on:
push:
branches: [ main, next ]
paths: [ 'fakewalletreact/**', 'js/**' ]
pull_request:
branches: [ main, next ]
paths: [ 'fakewalletreact/**', 'js/**' ]
release:
types: [ published ]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4

- name: set up Node
uses: actions/setup-node@v4
with:
node-version-file: 'fakewalletreact/package.json' # note - node engine should match between fakewalletreact/ and js/
cache: yarn
cache-dependency-path: 'fakewalletreact/yarn.lock' # note - this only caches for fakewalletreact/, not js/

- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Gradle cache
uses: gradle/actions/setup-gradle@v4

- name: '[js] Install yarn dependencies'
working-directory: 'js/'
run: yarn install --frozen-lockfile
- name: '[js] Lint'
working-directory: 'js/'
run: yarn lint
continue-on-error: true # TODO: fix all lint issues and remove this line
- name: '[js] Build'
working-directory: 'js/'
run: yarn build

- name: '[fakewalletreact] Install yarn dependencies'
working-directory: 'fakewalletreact/'
run: yarn install --frozen-lockfile
- name: '[fakewalletreact] Lint'
working-directory: 'fakewalletreact/'
run: yarn lint
continue-on-error: true # TODO: fix all lint issues and remove this line
- name: '[fakewalletreact] Build'
working-directory: 'fakewalletreact/'
run: yarn android:build
29 changes: 17 additions & 12 deletions fakewalletreact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,40 @@
"name": "fakewalletreact",
"version": "0.0.1",
"private": true,
"engines": {
"node": ">=18.18.0"
},
"scripts": {
"android": "react-native run-android",
"android:build": "react-native build-android --mode release --no-packager",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@solana-mobile/seed-vault-lib": "file:../js/packages/seed-vault",
"react": "18.2.0",
"eslint-plugin-ft-flow": "^3.0.11",
"react": "18.3.1",
"react-native": "0.71.4",
"react-native-paper": "^5.0.0-rc.5",
"react-native-safe-area-context": "^4.5.0"
"react-native-paper": "^5.12.5",
"react-native-safe-area-context": "^4.11.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@babel/core": "^7.25.9",
"@babel/preset-env": "^7.25.9",
"@babel/runtime": "^7.25.9",
"@react-native-community/eslint-config": "^3.2.0",
"@tsconfig/react-native": "^2.0.2",
"@types/jest": "^29.2.1",
"@types/react": "^18.0.24",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.2.1",
"@types/jest": "^29.5.14",
"@types/react": "^18.3.12",
"@types/react-test-renderer": "^18.3.0",
"babel-jest": "^29.7.0",
"eslint": "^8.19.0",
"jest": "^29.2.1",
"jest": "^29.7.0",
"metro-react-native-babel-preset": "0.73.9",
"prettier": "^2.4.1",
"react-test-renderer": "18.2.0",
"react-test-renderer": "18.3.1",
"typescript": "4.8.4"
},
"jest": {
Expand Down
Loading

0 comments on commit c178b79

Please sign in to comment.