Lint, test and build - Requested by @josh-leyshon (Run #22) #22
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: Lint, test and build | |
run-name: '${{ github.workflow }} - Requested by @${{github.actor}} (Run #${{github.run_number}})' | |
on: | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- '.vscode/**' | |
- '.nvmrc' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
name: ✍ Lint | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: npm | |
- name: Install deps | |
run: npm ci | |
- name: 🟣 Eslint | |
run: npm run lint | |
- name: 🔵 Type Check | |
run: npm run lint:types | |
test: | |
runs-on: ubuntu-latest | |
name: 🧪 Test | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: npm | |
- name: Install deps | |
run: npm ci | |
- name: 🤡 Jest tests | |
run: npm test | |
build: | |
runs-on: ubuntu-latest | |
name: 🏗 Build | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: npm | |
- name: Install deps | |
run: npm ci | |
- name: 🏗 Export project with expo | |
run: npm run build | |
build-web: | |
runs-on: ubuntu-latest | |
name: 🏗 Build (web) | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: npm | |
- name: Install deps | |
run: npm ci | |
- name: 🏗 Export project with expo (web) | |
run: npm run build:web |