-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into @tomekzaw/visionos
- Loading branch information
Showing
144 changed files
with
21,198 additions
and
46,678 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
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,51 @@ | ||
name: Test Android build | ||
on: | ||
pull_request: | ||
paths: | ||
- .github/workflows/build-android.yml | ||
- android/** | ||
- cpp/** | ||
- example/package.json | ||
- example/android/** | ||
- react-native.config.js | ||
merge_group: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- .github/workflows/build-android.yml | ||
- android/** | ||
- cpp/** | ||
- example/package.json | ||
- example/android/** | ||
- react-native.config.js | ||
|
||
jobs: | ||
build: | ||
if: github.repository == 'Expensify/react-native-live-markdown' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
react-native-architecture: ['Paper', 'Fabric'] | ||
fail-fast: false | ||
concurrency: | ||
group: build-android-${{ matrix.react-native-architecture }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Java 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Install node_modules | ||
run: yarn install --immutable | ||
|
||
- name: Build app | ||
working-directory: example/android | ||
run: ./gradlew assembleDebug --build-cache -PreactNativeArchitectures=arm64-v8a -PnewArchEnabled=${{ matrix.react-native-architecture == 'Fabric' && 'true' || 'false' }} |
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,83 @@ | ||
name: Test iOS build | ||
on: | ||
pull_request: | ||
paths: | ||
- .github/workflows/build-ios.yml | ||
- RNLiveMarkdown.podspec | ||
- ios/** | ||
- cpp/** | ||
- example/package.json | ||
- example/ios/** | ||
merge_group: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- .github/workflows/build-ios.yml | ||
- RNLiveMarkdown.podspec | ||
- ios/** | ||
- cpp/** | ||
- example/package.json | ||
- example/ios/** | ||
|
||
jobs: | ||
build: | ||
if: github.repository == 'Expensify/react-native-live-markdown' | ||
runs-on: macos-13 | ||
strategy: | ||
matrix: | ||
react-native-architecture: ['Paper', 'Fabric'] | ||
fail-fast: false | ||
concurrency: | ||
group: build-ios-${{ matrix.react-native-architecture }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Restore node_modules from cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
example/node_modules | ||
key: build-ios-node-modules-${{ matrix.react-native-architecture }}-${{ hashFiles('yarn.lock') }} | ||
restore-keys: build-ios-node-modules-${{ matrix.react-native-architecture }}- | ||
|
||
- name: Install node_modules | ||
run: yarn install --immutable | ||
|
||
- name: Restore Pods from cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
example/ios/Pods | ||
~/Library/Caches/CocoaPods | ||
~/.cocoapods | ||
key: build-ios-pods-${{ matrix.react-native-architecture }}-${{ hashFiles('example/node_modules/react-native/package.json') }} | ||
restore-keys: build-ios-pods-${{ matrix.react-native-architecture }}- | ||
|
||
- name: Install Pods | ||
working-directory: example/ios | ||
env: | ||
RCT_NEW_ARCH_ENABLED: ${{ matrix.react-native-architecture == 'Fabric' && '1' || '0' }} | ||
run: | | ||
bundler install | ||
bundler exec pod install | ||
- name: Remove .xcode.env.local | ||
working-directory: example/ios | ||
run: rm -rf .xcode.env.local | ||
|
||
- name: Restore build artifacts from cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/Library/Developer/Xcode/DerivedData | ||
key: build-ios-derived-data-${{ matrix.react-native-architecture }}-${{ hashFiles('example/node_modules/react-native/package.json') }} | ||
restore-keys: build-ios-derived-data-${{ matrix.react-native-architecture }}- | ||
|
||
- name: Build app | ||
working-directory: example | ||
run: npx react-native@latest run-ios --no-packager |
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,35 @@ | ||
name: Test web build | ||
on: | ||
pull_request: | ||
paths: | ||
- .github/workflows/build-web.yml | ||
- src/** | ||
- WebExample/** | ||
merge_group: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- .github/workflows/build-web.yml | ||
- src/** | ||
- WebExample/** | ||
|
||
jobs: | ||
build: | ||
if: github.repository == 'Expensify/react-native-live-markdown' | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: build-web-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install node_modules | ||
run: yarn install --immutable | ||
|
||
- name: Build app | ||
working-directory: WebExample | ||
run: npx expo export:web |
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,56 @@ | ||
name: Typecheck, lint and test | ||
on: | ||
pull_request: | ||
merge_group: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check: | ||
if: github.repository == 'Expensify/react-native-live-markdown' | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: check-root-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install node_modules | ||
run: yarn install --immutable | ||
|
||
- name: Verify there's no parser diff | ||
working-directory: parser | ||
run: | | ||
yarn build | ||
if ! git diff --name-only --exit-code; then | ||
# shellcheck disable=SC2016 | ||
echo 'Error: Parser diff detected! Please run `cd parser && yarn build` and commit the changes.' | ||
exit 1 | ||
fi | ||
- name: Typecheck library | ||
run: yarn tsc --project tsconfig.json --noEmit | ||
|
||
- name: Typecheck parser | ||
run: yarn tsc --project parser/tsconfig.json --noEmit | ||
|
||
- name: Typecheck example app | ||
run: yarn tsc --project example/tsconfig.json --noEmit | ||
|
||
- name: Typecheck WebExample app | ||
run: yarn tsc --project WebExample/tsconfig.json --noEmit | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Test | ||
run: yarn test |
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 |
---|---|---|
|
@@ -17,9 +17,12 @@ jobs: | |
if: ${{ github.actor != 'OSBotify' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
# The OS_BOTIFY_COMMIT_TOKEN is a personal access token tied to osbotify | ||
# This is a workaround to allow pushes to a protected branch | ||
token: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }} | ||
|
||
- name: Decrypt & Import OSBotify GPG key | ||
run: | | ||
|
@@ -36,17 +39,11 @@ jobs: | |
git config --global user.name OSBotify | ||
git config --global user.email [email protected] | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '16.x' | ||
node-version-file: '.nvmrc' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Generate branch name | ||
run: echo "BRANCH_NAME=OSBotify-bump-version-$(uuidgen)" >> $GITHUB_ENV | ||
|
||
- name: Create branch for version-bump pull request | ||
run: git checkout -b ${{ env.BRANCH_NAME }} | ||
|
||
- name: Install yarn packages | ||
run: yarn install --immutable | ||
|
||
|
@@ -63,26 +60,7 @@ jobs: | |
run: git tag ${{ env.NEW_VERSION }} | ||
|
||
- name: Push branch and publish tags | ||
run: git push --set-upstream origin ${{ env.BRANCH_NAME }} && git push --tags | ||
|
||
- name: Create pull request | ||
run: | | ||
gh pr create \ | ||
--title "Update version to ${{ env.NEW_VERSION }}" \ | ||
--body "Update version to ${{ env.NEW_VERSION }}" | ||
sleep 5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} | ||
|
||
- name: Auto-approve pull request | ||
run: gh pr review --approve ${{ env.BRANCH_NAME }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Auto-merge pull request | ||
run: gh pr merge --squash --delete-branch ${{ env.BRANCH_NAME }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: git push --set-upstream origin main && git push --tags | ||
|
||
- name: Build package | ||
run: yarn pack | ||
|
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,49 @@ | ||
name: Test web E2E | ||
on: | ||
pull_request: | ||
paths: | ||
- .github/workflows/web-e2e-test.yml | ||
- src/** | ||
- WebExample/** | ||
merge_group: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- .github/workflows/web-e2e-test.yml | ||
- src/** | ||
- WebExample/** | ||
|
||
jobs: | ||
test: | ||
if: github.repository == 'Expensify/react-native-live-markdown' | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./WebExample | ||
|
||
concurrency: | ||
group: web-e2e-test-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install node_modules | ||
run: yarn install --immutable | ||
|
||
- name: Install browsers | ||
run: npx playwright install --with-deps | ||
|
||
- name: Install dependencies for browsers | ||
run: npx playwright install-deps | ||
|
||
- name: Run Playwright tests | ||
run: yarn test |
Oops, something went wrong.