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:
parent
f75bbaeb37
commit
e11c0b05f8
38
.github/workflows/ci.yml
vendored
Normal file
38
.github/workflows/ci.yml
vendored
Normal 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
|
||||
@ -19,7 +19,7 @@
|
||||
"db:migrate:local": "wrangler d1 migrations apply DB --local",
|
||||
"db:migrate:prod": "wrangler d1 migrations apply DB --remote",
|
||||
"knip": "knip",
|
||||
"ci": "prettier --check . && knip && tsc --noEmit && oxlint . --type-aware"
|
||||
"ci:check": "prettier --check . && knip && tsc --noEmit && oxlint . --type-aware"
|
||||
},
|
||||
"cloudflare": {
|
||||
"bindings": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user