Add github workflows #1
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: Branch Healthcheck | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
NODE_VERSION: 20.18.0 | |
jobs: | |
expo-doctor: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Commit | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install Dependencies | |
run: yarn --frozen-lockfile | |
- name: Run Expo Doctor | |
run: npx expo-doctor@latest | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Commit | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install Dependencies | |
run: yarn --frozen-lockfile | |
- name: Run Prettier | |
run: yarn format | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Commit | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install Dependencies | |
run: yarn --frozen-lockfile | |
- name: Run ESLint | |
run: yarn lint | |
typecheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Commit | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install Dependencies | |
run: yarn --frozen-lockfile | |
- name: Generate Expo Router Types | |
run: yarn expo customize tsconfig.json | |
- name: Run TypeScript Compiler | |
run: yarn typecheck | |
spellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Commit | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Run cSpell | |
run: yarn spellcheck | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Commit | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install Dependencies | |
run: yarn --frozen-lockfile | |
- name: Run Jest | |
run: yarn test |