Skip to content

Commit

Permalink
ci(workers): check-format
Browse files Browse the repository at this point in the history
  • Loading branch information
shaokeyibb committed Jul 17, 2024
1 parent 59c2e17 commit 27a90de
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/check-format-and-test-cloudflare-workers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Check PR Format and Test for cloudflare-workers

on:
pull_request:
branches:
- master

jobs:
check-format:
name: Check PR Format
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cloudflare-workers
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
name: Set Node.js 20.x
with:
node-version: 20.x
- uses: borales/actions-yarn@v5
name: Run install
with:
cmd: install
- uses: borales/actions-yarn@v5
name: Check Format
with:
cmd: prettier --check .
3 changes: 2 additions & 1 deletion cloudflare-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"start": "wrangler dev",
"test": "vitest",
"cf-typegen": "wrangler types",
"cf-initdb": "wrangler d1 execute comments --remote --file=schema.sql"
"cf-initdb": "wrangler d1 execute comments --remote --file=schema.sql",
"cf-initdb-local": "wrangler d1 execute comments --local --file=schema.sql"
},
"devDependencies": {
"@cloudflare/vitest-pool-workers": "^0.4.5",
Expand Down

0 comments on commit 27a90de

Please sign in to comment.