diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e41ed9b..d4590f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/package.json b/package.json index 5bde783..1efc2d4 100644 --- a/package.json +++ b/package.json @@ -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",