Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Adds build checks #1055

Merged
merged 17 commits into from
Aug 18, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/android-build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test android build
on:
pull_request:
branches: [master]
jobs:
test:
Ubax marked this conversation as resolved.
Show resolved Hide resolved
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install dependencies
Ubax marked this conversation as resolved.
Show resolved Hide resolved
run: yarn && cd TestsExample && yarn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is yarn run only here in the main dir of react-native-screens and omitted in other builds? Are we certain that this job will run first and packages will be cached for others? It so I'd still split it to separate steps.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was there because before I was also running emulator and the app crashed without root dependencies.
I decided that it is not necessary to run it (without emulator job takes 3 minutes instead of 5 and can be ran on ubuntu).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the unnecessary yarn

- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
Ubax marked this conversation as resolved.
Show resolved Hide resolved
script: cd TestsExample && npx react-native run-android --variant=release
20 changes: 20 additions & 0 deletions .github/workflows/ios-build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test iOS build
on:
pull_request:
branches: [master]
jobs:
test:
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install node dependencies
run: cd TestsExample && yarn
- name: Install pods
run: cd TestsExample/ios && pod install
- name: Build app
run: cd TestsExample && yarn ios
20 changes: 20 additions & 0 deletions .github/workflows/tv-os-build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test tvOS build
on:
pull_request:
branches: [master]
jobs:
test:
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install node dependencies
run: cd TVOSExample && yarn
- name: Install pods
run: cd TVOSExample/ios && pod install
- name: Build app
run: cd TVOSExample && yarn tv-os
Ubax marked this conversation as resolved.
Show resolved Hide resolved