Skip to content

Commit

Permalink
chore: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
reime005 committed Mar 21, 2020
1 parent caf5f08 commit 3957985
Show file tree
Hide file tree
Showing 24 changed files with 1,359 additions and 1,841 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
example/RNBackgroundExample/node_modules
example/RNBackgroundExample/e2e
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
};
37 changes: 21 additions & 16 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: React Native Android
name: Test Android Example App

on:
push:
branches:
- detox-tests
pull_request:
branches:
- detox-tests
on: [push, pull_request]

jobs:
react-native-android:
Expand All @@ -30,23 +24,34 @@ jobs:

- name: Setup Android emulator
run: |
echo y | sudo $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-28;google_apis;x86_64"
$ANDROID_HOME/tools/bin/avdmanager -s create avd -n emu -k "system-images;android-28;google_apis;x86_64" -b "x86_64" -c 1G -d 7 -f
echo y | sudo $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-28;google_apis;x86" > /dev/null
$ANDROID_HOME/tools/bin/avdmanager -s create avd -n emu -k "system-images;android-28;google_apis;x86" -b "x86" -c 1G -d 7 -f
- name: Install node_modules & deploy
- name: Install node_modules
working-directory: example/RNBackgroundExample/
run: |
run:
yarn install --frozen-lockfile

- name: Deploy
working-directory: example/RNBackgroundExample/
run:
yarn e2e/deploy/android

- name: Android test
- name: Start Emulator
working-directory: example/RNBackgroundExample/
timeout-minutes: 10
timeout-minutes: 5
run: |
mkdir -p ./artifacts
export PATH=$PATH:$ANDROID_HOME/platform-tools
$ANDROID_HOME/emulator/emulator @emu &
$ANDROID_HOME/emulator/emulator @emu -noaudio -no-boot-anim -netdelay none -accel on -no-snapshot &
adb wait-for-device; adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;'; adb shell wm dismiss-keyguard
- name: Android test
working-directory: example/RNBackgroundExample/
timeout-minutes: 8
run: |
mkdir -p ./artifacts
node e2e/start-server.js &
adb reverse tcp:8080 tcp:8080
yarn e2e/test/android --record-videos all
- uses: actions/upload-artifact@master
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy & Release
on:
push:
branches:
- detox-tests
- master

jobs:
deploy-release:
Expand All @@ -19,7 +19,7 @@ jobs:
with:
node-version: 12

- name: Release NPM
- name: Release to NPM
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/iOS.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: React Native iOS
name: Test iOS Example App

on:
push:
branches:
- detox-tests
pull_request:
branches:
- detox-tests
on: [push, pull_request]

jobs:
react-native-ios:
Expand All @@ -27,15 +21,20 @@ jobs:
brew tap wix/brew
brew install applesimutils
- name: Install node_modules & deploy
- name: Install node_modules
working-directory: example/RNBackgroundExample/
run: |
run:
yarn install --frozen-lockfile

- name: Deploy
working-directory: example/RNBackgroundExample/
run:
yarn deploy/release/ios

- name: iOS test
working-directory: example/RNBackgroundExample/
timeout-minutes: 10
timeout-minutes: 8
run: |
npx detox clean-framework-cache && npx detox build-framework-cache
node e2e/start-server.js &
yarn e2e/test/ios
24 changes: 24 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Node Environment

on: [push, pull_request]

jobs:
node-lint-tests:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"

steps:
- name: checkout
uses: actions/checkout@v1

- name: setup node
uses: actions/setup-node@v1
with:
node-version: 12

- name: install node_modules
run: yarn install --frozen-lockfile

- name: node lint
run:
yarn lint:ci
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
bracketSpacing: false,
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
};
5 changes: 0 additions & 5 deletions commitlint.config.js

This file was deleted.

Loading

0 comments on commit 3957985

Please sign in to comment.