Skip to content

Commit

Permalink
ci: add ci for code lint and test (#49)
Browse files Browse the repository at this point in the history
* ci: add ci for code lint and test

* ci: fix code lint

* ci: fix build ci

* ci: setup ci for push
  • Loading branch information
fu050409 authored Jan 31, 2025
1 parent 47281f2 commit 51a267a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and Test

on:
push:
branches: [main]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build Components
run: pnpm lib:build
- name: Build Core
run: pnpm core:build
- name: Build Docs
run: pnpm docs:build
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Lint Pr Title
name: Code Lint

on: [pull_request]
on:
push:
branches: [main]
pull_request:

jobs:
lint-code-spell:
name: Code Spell Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -27,3 +29,5 @@ jobs:
config: .cspell.json
strict: true
verbose: true
- name: Code Lint
run: pnpm lint
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"description": "Kawa resume for frontend developer",
"scripts": {
"lint": "biome check",
"lint-staged": "lint-staged",
"docs:dev": "rspress dev",
"docs:build": "rspress build",
"lib:build": "pnpm --filter @kawafe/components build",
Expand Down

0 comments on commit 51a267a

Please sign in to comment.