Skip to content

Commit

Permalink
Merge pull request react-navigation#120 from davidgovea/github-actions
Browse files Browse the repository at this point in the history
GitHub actions
  • Loading branch information
brentvatne authored May 15, 2020
2 parents fb3a0c3 + dbf5de0 commit 9ffbacc
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 9 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI

on: [push, pull_request]

jobs:
js-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install yarn
run: npm install -g yarn
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
- name: Run tests
run: yarn test
android-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install yarn
run: npm install -g yarn
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-example-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-example-
- name: Install dependencies
run: cd example/android && yarn install
- name: Build android example app
run: cd example/android && ./gradlew assembleDebug
ios-build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.x'
- name: Install cocoapods
run: gem install cocoapods
- name: Install yarn
run: npm install -g yarn
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-example-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-example-
- name: Install dependencies
run: cd example/ios && yarn install
- name: Install pods
run: cd example/ios && pod install
- name: Build ios example app
run: cd example/ios && xcodebuild -scheme SafeAreaViewExample -workspace SafeAreaViewExample.xcworkspace ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator -configuration Debug
8 changes: 0 additions & 8 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,6 @@ android {
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@
"singleQuote": true
},
"scripts": {
"test": "jest",
"test": "yarn validate:prettier && yarn typescript",
"typescript": "tsc --noEmit",
"validate:prettier": "npx prettier \"src/**/*.{js,ts,tsx}\" \"example/**/*.{js,ts,tsx}\" --check",
"prepare": "bob build",
"example": "yarn --cwd example",
"bootstrap": "yarn example && yarn"
Expand Down

0 comments on commit 9ffbacc

Please sign in to comment.