Skip to content

Commit

Permalink
Github Actions Workflow
Browse files Browse the repository at this point in the history
- Run the test suite
- Push a iOS build to EAS

on-behalf-of: @org <team@theoutbound.com>
Co-authored-by: Ty Rauber <tyrauber@mac.com>
Co-authored-by: Vitor Lima <vitor@madai.com.br>
  • Loading branch information
tyrauber and vlimag committed May 20, 2021
1 parent 9d60386 commit 13b8e77
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 15.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies
run: yarn
- run: yarn test
env:
MAPBOX_API_KEY: 'MAPBOX_API_TOKEN'

publish:
name: Install and publish
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Setup Expo
uses: expo/expo-github-action@v5
with:
expo-version: 4.x
expo-token: ${{ secrets.EXPO_TOKEN }}
expo-cache: true

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build on EAS
run: npx eas-cli build --profile preview -p ios --non-interactive

0 comments on commit 13b8e77

Please sign in to comment.