Skip to content

Commit

Permalink
ci: update ci workflow into separate jobs, add type-check job (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack authored Sep 29, 2023
1 parent aac19fd commit a3c0ce6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 15 deletions.
36 changes: 27 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,44 @@ on:
pull_request:

jobs:
ci:
name: CI
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Build
run: npm run build
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test -- --ci

- name: Test
run: npm run test
type-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Check TypeScript types
run: npm run type-check
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@
"dist/cjs/focus-trap.js"
],
"scripts": {
"lint": "eslint src/",
"test": "npm run jest && npm run lint",
"test:watch": "jest --watch",
"jest": "jest",
"clean": "rm -rf dist",
"prebuild": "npm run clean",
"build": "npm run build:esm && npm run build:cjs",
"build:esm": "tsc",
"build:cjs": "tsc --module commonjs --outDir dist/cjs",
"lint": "eslint src/",
"test": "jest",
"test:watch": "jest --watch",
"prebuild": "npm run clean",
"release": "npm run build && changeset publish",
"size-limit": "npm run build && size-limit",
"release": "npm run build && changeset publish"
"type-check": "tsc --noEmit"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit a3c0ce6

Please sign in to comment.