Skip to content

Commit

Permalink
feat: add simple ci with eslint, typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
tanlethanh committed Sep 11, 2024
1 parent 3a43bff commit d1bc31b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI
on:
push:
branches: ["main", "dev"]
pull_request:
branches: ["main", "dev"]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20

- name: Setup Yarn
run: corepack enable && yarn set version stable

- name: Install dependencies
run: yarn

- name: Lint
run: yarn lint

- name: Typecheck
run: yarn type-check
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
}
},
"scripts": {
"lint": "eslint . --ext .ts,.tsx",
"lint:fix": "eslint . --ext .ts,.tsx --fix",
"type-check": "tsc --noEmit",
"example:sss-28": "tsx ./examples/sss-28.ts",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:esm": "tsc -p tsconfig.esm.json",
Expand Down

0 comments on commit d1bc31b

Please sign in to comment.