Skip to content

Commit

Permalink
ci: add ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
erictaylor committed Mar 31, 2024
1 parent 5b9a379 commit d59ae57
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]

jobs:
build:
name: Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: pnpm/action-setup@v3
with:
version: 8

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Check Format/Linting
run: pnpm run check:ci

- name: Build
run: pnpm run build

- name: Test
run: pnpm test

- name: Check size
run: pnpm run size
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,12 @@
"scripts": {
"build": "tsc --project tsconfig.build.json",
"check": "biome check ./",
"check:ci": "biome ci ./",
"format": "biome format --write ./",
"prepublishOnly": "pnpm run build",
"size": "size-limit",
"size:why": "size-limit --why",
"test": "pnpm run test:biome && pnpm run test:vitest run",
"test:biome": "biome ci ./",
"test:vitest": "vitest"
"test": "vitest"
},
"dependencies": {
"clsx": "^2.1.0"
Expand Down

0 comments on commit d59ae57

Please sign in to comment.