Skip to content

Commit

Permalink
Github CA (Formatting Check)
Browse files Browse the repository at this point in the history
  • Loading branch information
aishenreemo committed Aug 6, 2023
1 parent 7e6a2db commit 310244c
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 6 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Format Check

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

jobs:
prettier-check:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Node.js and pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Format check on react-todo
run: cd packages/react-todo && pnpm install && pnpm run check

- name: Format check on svelte-todo
run: cd packages/svelte-todo && pnpm install && pnpm run check

- name: Format check on vanilla-todo
run: cd packages/vanilla-todo && pnpm install && pnpm run check

- name: Format check on vue-todo
run: cd packages/vue-todo && pnpm install && pnpm run check
3 changes: 2 additions & 1 deletion packages/react-todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"format": "pnpm exec -- npx prettier --write ."
"format": "pnpm exec -- npx prettier --write .",
"check": "pnpm exec -- npx prettier --check ."
},
"dependencies": {
"react": "^18.2.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/svelte-todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write .",
"prettier:check": "pnpm exec -- npx prettier --plugin-search-dir . --check .",
"test:integration": "playwright test",
"test:unit": "vitest"
},
Expand All @@ -33,4 +34,4 @@
"vitest": "^0.32.2"
},
"type": "module"
}
}
5 changes: 3 additions & 2 deletions packages/vanilla-todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"format": "pnpm exec -- npx prettier --write ."
"format": "pnpm exec -- npx prettier --write .",
"check": "pnpm exec -- npx prettier --check ."
},
"devDependencies": {
"vite": "^4.4.5"
}
}
}
5 changes: 3 additions & 2 deletions packages/vue-todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"dev": "vite",
"build": "vue-tsc && vite build",
"preview": "vite preview",
"format": "pnpm exec -- npx prettier --write ."
"format": "pnpm exec -- npx prettier --write .",
"check": "pnpm exec -- npx prettier --check ."
},
"dependencies": {
"vue": "^3.3.4"
Expand All @@ -18,4 +19,4 @@
"vite": "^4.4.5",
"vue-tsc": "^1.8.5"
}
}
}

0 comments on commit 310244c

Please sign in to comment.