Skip to content

Commit

Permalink
feat: added ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
vwh committed Nov 22, 2024
1 parent b5aa27d commit 94d15d0
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Check Format

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
format:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

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

- name: Install dependencies
run: npm install --force

- name: Run Prettier check
run: npm run format:check
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

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

- name: Install dependencies
run: npm install --force

- name: Run ESLint
run: npm run lint
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"start": "next start -p 9169",
"lint": "next lint",
"test": "tsx ./tests/test.ts",
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'"
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'",
"format:check": "prettier --check 'src/**/*.{js,jsx,ts,tsx}'"
},
"dependencies": {
"@radix-ui/react-slot": "^1.1.0",
Expand Down

0 comments on commit 94d15d0

Please sign in to comment.