Skip to content

Commit

Permalink
Update github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Temzasse committed May 11, 2024
1 parent 74dc61b commit 9ffd87d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
37 changes: 28 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on: [push]
jobs:
lint:
name: ⬣ ESLint
name: 🧶 Lint
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
Expand All @@ -12,7 +12,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: 18
node-version: 20

- name: 📥 Install deps
run: npm ci
Expand All @@ -21,7 +21,7 @@ jobs:
run: npm run lint

typecheck:
name: ʦ TypeScript
name: 👮🏻‍♂️ Typecheck
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
Expand All @@ -31,16 +31,13 @@ jobs:
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: 18
node-version: 20

- name: 📥 Install deps
run: npm ci

- name: 🔎 Type check
run: npm run types:check

- name: 🔬 Analyze types
run: npm run types:analyze
run: npm run typecheck

test:
name: 🧪 Test
Expand All @@ -53,10 +50,32 @@ jobs:
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: 18
node-version: 20

- name: 📥 Install deps
run: npm ci

- name: 🔬 Test
run: npm run test

build:
name: 📦 Build and verify
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: 20

- name: 📥 Install deps
run: npm ci

- name: 🏗️ Build library
run: npm run build

- name: 🔬 Verify build
run: npm run build:verify
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"scripts": {
"dev": "tsup --watch --onSuccess \"npm run link:self\"",
"build": "tsup",
"build:verify": "attw --pack .",
"format:check": "prettier . --check",
"format:write": "prettier . --write",
"lint": "eslint src/* --fix --max-warnings=0",
"link:self": "yalc publish && npm run link:example && npm run link:example-ssr",
"link:example": "cd example && yalc add react-modal-sheet",
"link:example-ssr": "cd example-ssr && yalc add react-modal-sheet",
"test": "vitest run",
"types:check": "tsc --noEmit --skipLibCheck",
"types:analyze": "attw --pack .",
"typecheck": "tsc --noEmit --skipLibCheck",
"release": "npm run build && types:analyze && np"
},
"dependencies": {
Expand Down

0 comments on commit 9ffd87d

Please sign in to comment.