-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,58 @@ | ||
name: CI | ||
on: [push] | ||
jobs: | ||
build: | ||
lint: | ||
name: ⬣ ESLint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: 'yarn' | ||
node-version: 18 | ||
|
||
- name: 📥 Install deps | ||
run: yarn | ||
|
||
- name: 🔬 Lint | ||
run: yarn lint | ||
|
||
typecheck: | ||
name: ʦ TypeScript | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Begin CI... | ||
uses: actions/checkout@v2 | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node 12 | ||
uses: actions/setup-node@v1 | ||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 12.x | ||
cache: 'yarn' | ||
node-version: 18 | ||
|
||
- name: 📥 Install deps | ||
run: yarn | ||
|
||
- name: 🔎 Type check | ||
run: yarn typecheck | ||
test: | ||
name: 🧪 Jest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use cached node_modules | ||
uses: actions/cache@v1 | ||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
path: node_modules | ||
key: nodeModules-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
nodeModules- | ||
cache: 'yarn' | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
env: | ||
CI: true | ||
- name: 📥 Install deps | ||
run: yarn | ||
|
||
- name: Lint | ||
run: yarn lint | ||
env: | ||
CI: true | ||
|
||
- name: Test | ||
run: yarn test --ci --coverage --maxWorkers=2 | ||
env: | ||
CI: true | ||
|
||
- name: Build | ||
run: yarn build | ||
env: | ||
CI: true | ||
- name: 🔬 Test | ||
run: yarn test |