ci: run pnpm ci in GitHub Actions (#16)

* ci: run pnpm ci in GitHub Actions

* ci: pin pnpm version in workflow

* ci: use ci:check script in workflow

* ci: run PR checks on head sha
This commit is contained in:
Ben Senescu 2026-03-11 11:57:28 -04:00 committed by GitHub
parent f75bbaeb37
commit e11c0b05f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 39 additions and 1 deletions

38
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: CI
on:
pull_request:
push:
branches:
- main
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run CI checks
run: pnpm run ci:check

View File

@ -19,7 +19,7 @@
"db:migrate:local": "wrangler d1 migrations apply DB --local", "db:migrate:local": "wrangler d1 migrations apply DB --local",
"db:migrate:prod": "wrangler d1 migrations apply DB --remote", "db:migrate:prod": "wrangler d1 migrations apply DB --remote",
"knip": "knip", "knip": "knip",
"ci": "prettier --check . && knip && tsc --noEmit && oxlint . --type-aware" "ci:check": "prettier --check . && knip && tsc --noEmit && oxlint . --type-aware"
}, },
"cloudflare": { "cloudflare": {
"bindings": { "bindings": {