-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'mobile-app/reorganised-history' into mo…
…bile-monorepo-correct
- Loading branch information
Showing
438 changed files
with
37,255 additions
and
1,864 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Run Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- apps/mobile/** | ||
- packages/store/** | ||
pull_request: | ||
paths: | ||
- apps/mobile/** | ||
- packages/store/** | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the code | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Enable Corepack | ||
run: corepack enable | ||
|
||
# Set up Node.js | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22.11.0' # jod | ||
cache: 'yarn' | ||
|
||
# Install dependencies | ||
- name: Install dependencies | ||
run: yarn install --immutable | ||
|
||
# Run tests with coverage | ||
- name: Run lint | ||
run: | | ||
yarn workspace @safe-global/mobile run lint |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Run Tests and Coverage | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- apps/mobile/** | ||
pull_request: | ||
paths: | ||
- apps/mobile/** | ||
|
||
jobs: | ||
test-and-coverage: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the code | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Enable Corepack | ||
run: corepack enable | ||
|
||
# Set up Node.js | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22.11.0' # jod | ||
cache: 'yarn' | ||
|
||
# Install dependencies | ||
- name: Install dependencies | ||
run: yarn install --immutable | ||
|
||
# Run tests with coverage | ||
- name: Run Jest tests with coverage | ||
run: | | ||
yarn workspace @safe-global/mobile test:coverage --coverageReporters=text --coverageReporters=json-summary | tee ./coverage.txt && exit ${PIPESTATUS[0]} | ||
- name: Jest Coverage Comment | ||
uses: MishaKav/jest-coverage-comment@v1 | ||
with: | ||
coverage-summary-path: ./coverage/coverage-summary.json | ||
coverage-title: Coverage | ||
coverage-path: ./coverage.txt |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npx lint-staged |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"*.ts": ["yarn prettier:fix"], | ||
"*.tsx": ["yarn prettier:fix"], | ||
"apps/mobile/assets/fonts/safe-icons/selection.json": [ | ||
"node ./apps/mobile/scripts/generateIconTypes.js", | ||
"git add ./apps/mobile/src/types/iconTypes.ts" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Ignore artifacts: | ||
build | ||
coverage | ||
node_modules | ||
html | ||
ios | ||
android | ||
/assets | ||
|
||
apps/mobile/assets |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
build: | ||
name: Create a build and run Maestro tests on it | ||
steps: | ||
- eas/checkout | ||
|
||
- run: | ||
name: Enable corepack | ||
command: corepack enable | ||
|
||
# if you are not interested in using custom .npmrc config you can skip it | ||
- eas/use_npm_token | ||
|
||
- eas/install_node_modules | ||
|
||
- eas/resolve_build_config | ||
|
||
- eas/prebuild | ||
|
||
- run: | ||
name: Install pods | ||
working_directory: ./ios | ||
command: pod install | ||
|
||
# if you are not using EAS Update you can remove this step from your config | ||
# https://docs.expo.dev/eas-update/introduction/ | ||
- eas/configure_eas_update: | ||
inputs: | ||
throw_if_not_configured: false | ||
|
||
- eas/generate_gymfile_from_template | ||
|
||
- eas/run_fastlane | ||
|
||
- eas/find_and_upload_build_artifacts | ||
- eas/maestro_test: | ||
inputs: | ||
flow_path: | | ||
e2e/flow.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
node_modules/ | ||
.expo/ | ||
dist/ | ||
npm-debug.* | ||
*.jks | ||
*.p8 | ||
*.p12 | ||
*.key | ||
*.mobileprovision | ||
*.orig.* | ||
web-build/ | ||
|
||
# Auto generated storybook file | ||
.storybook/storybook.requires.ts | ||
|
||
# From jest | ||
html | ||
coverage | ||
|
||
# macOS | ||
.DS_Store | ||
|
||
# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb | ||
# The following patterns were generated by expo-cli | ||
|
||
expo-env.d.ts | ||
# @end expo-cli | ||
/.idea | ||
# Tamagui UI generates a lot of cache files | ||
.tamagui | ||
|
||
*storybook.log | ||
/storybook-static | ||
|
||
# Android and iOS build files | ||
/android/* | ||
/ios/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import AsyncStorage from '@react-native-async-storage/async-storage' | ||
import { view } from './storybook.requires' | ||
|
||
const StorybookUIRoot = view.getStorybookUI({ | ||
storage: { | ||
getItem: AsyncStorage.getItem, | ||
setItem: AsyncStorage.setItem, | ||
}, | ||
}) | ||
|
||
export default StorybookUIRoot |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import type { StorybookConfig as WebStorybookConfig } from '@storybook/react-webpack5' | ||
import type { StorybookConfig as RNStorybookConfig } from '@storybook/react-native' | ||
|
||
const isWeb = process.env.STORYBOOK_WEB | ||
import path from 'path' | ||
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin' | ||
|
||
let config: WebStorybookConfig | RNStorybookConfig | ||
|
||
if (isWeb) { | ||
config = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-interactions', | ||
{ | ||
name: '@storybook/addon-react-native-web', | ||
options: { | ||
projectRoot: '../', | ||
modulesToTranspile: [], | ||
}, | ||
}, | ||
'@storybook/addon-webpack5-compiler-babel', | ||
], | ||
framework: { | ||
name: '@storybook/react-webpack5', | ||
options: {}, | ||
}, | ||
webpackFinal: async (config) => { | ||
if (config.resolve) { | ||
config.resolve.plugins = [ | ||
...(config.resolve.plugins || []), | ||
new TsconfigPathsPlugin({ | ||
extensions: config.resolve.extensions, | ||
}), | ||
] | ||
|
||
config.resolve.alias = { | ||
...config.resolve.alias, | ||
'@': path.resolve(__dirname, '../'), | ||
} | ||
} | ||
return config | ||
}, | ||
} as WebStorybookConfig | ||
} else { | ||
config = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: ['@storybook/addon-ondevice-controls', '@storybook/addon-ondevice-actions'], | ||
} as RNStorybookConfig | ||
} | ||
export default config |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import type { Preview } from '@storybook/react' | ||
import { NavigationIndependentTree } from '@react-navigation/native' | ||
import { SafeThemeProvider } from '@/src/theme/provider/safeTheme' | ||
import { View } from 'react-native' | ||
import { SafeToastProvider } from '@/src/theme/provider/toastProvider' | ||
import { SafeAreaProvider } from 'react-native-safe-area-context' | ||
import { PortalProvider } from 'tamagui' | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}, | ||
tags: ['autodocs'], | ||
decorators: [ | ||
(Story) => { | ||
return ( | ||
<PortalProvider shouldAddRootHost> | ||
<NavigationIndependentTree> | ||
<SafeAreaProvider> | ||
<SafeThemeProvider> | ||
<SafeToastProvider> | ||
<View style={{ padding: 16, flex: 1 }}> | ||
<Story /> | ||
</View> | ||
</SafeToastProvider> | ||
</SafeThemeProvider> | ||
</SafeAreaProvider> | ||
</NavigationIndependentTree> | ||
</PortalProvider> | ||
) | ||
}, | ||
], | ||
} | ||
|
||
export default preview |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"module": "commonjs" | ||
}, | ||
"include": ["../src/**/*", "./**/*"] | ||
} |
Oops, something went wrong.