Create ci.yml
This commit is contained in:
@@ -0,0 +1,85 @@
|
|||||||
|
name: 🔍 CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: 🪄 Check lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: ⬇️ Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: 🧰 Setup Node
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: 📥 Install
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: 🔍 Lint
|
||||||
|
run: npm run lint
|
||||||
|
|
||||||
|
format:
|
||||||
|
name: 🎨 Check format
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: ⬇️ Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: 🧰 Setup Node
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: 📥 Install
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: 🎨 Format
|
||||||
|
run: npm run format:check
|
||||||
|
|
||||||
|
typecheck:
|
||||||
|
name: 🔎 Typecheck
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: ⬇️ Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: 🧰 Setup Node
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: 📥 Install
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: 🔎 Typecheck
|
||||||
|
run: npm run typecheck
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: 🏗 Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [lint, format, typecheck]
|
||||||
|
steps:
|
||||||
|
- name: ⬇️ Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: 🧰 Setup Node
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: 📥 Install
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: 🏗 Build
|
||||||
|
run: npm run build
|
||||||
Reference in New Issue
Block a user