test: github workflows #16
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
name: Gluestack-ui Expo App | Start and Build | |
on: | |
push: | |
branches: | |
- patch | |
pull_request: | |
branches: | |
- patch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
working-directory: expo-app | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
- name: Install dependencies | |
working-directory: ${{ env.working-directory }} | |
run: yarn | |
- name: Start Expo on port 19006 | |
working-directory: ${{ env.working-directory }} | |
run: | | |
yarn web --port 19006 & | |
echo $! > expo_pid.txt | |
sleep 60 # Wait for Expo to start | |
- name: Run tests | |
working-directory: ${{ env.working-directory }} | |
run: yarn test | |
- name: Kill Expo server | |
run: | | |
kill $(cat expo_pid.txt) |