Github CI Testing 17 #13
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: CI Tests | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
init-job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Cache node_modules and npm global cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
node_modules | |
~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm install | |
- name: Persist workspace for other jobs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: workspace | |
path: . | |
lint-ts: | |
runs-on: ubuntu-latest | |
needs: init-job | |
steps: | |
- name: Download workspace | |
uses: actions/download-artifact@v3 | |
with: | |
name: workspace | |
path: . | |
- name: Run TypeScript Lint | |
run: npx eslint | |
type-check: | |
runs-on: ubuntu-latest | |
needs: init-job | |
steps: | |
- name: Download workspace | |
uses: actions/download-artifact@v3 | |
with: | |
name: workspace | |
path: . | |
- name: Run Type Check | |
run: npm run tsc --noEmit | |
expo-doctor: | |
runs-on: ubuntu-latest | |
needs: init-job | |
steps: | |
- name: Download workspace | |
uses: actions/download-artifact@v3 | |
with: | |
name: workspace | |
path: . | |
- name: Run Expo Doctor | |
run: npx expo-doctor@latest |