Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
# These jobs run code from the pull request (install scripts,
# tests, the packaged CLI) and never push, so the checkout must
# not leave the job token readable in .git/config.
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
Expand All @@ -32,12 +37,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
# These jobs run code from the pull request (install scripts,
# tests, the packaged CLI) and never push, so the checkout must
# not leave the job token readable in .git/config.
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
Comment thread
benglewis marked this conversation as resolved.
- name: Build project
run: npm run build
- name: Create package
Expand Down
5 changes: 5 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@ export default defineConfig({
test: {
globals: true,
environment: "node",
// Only the sources. `tsc` copies the specs into `dist/`, and stale builds
// and git worktrees leave more copies around, so an unscoped run collects
// the same test several times over — and fails on copies whose source is
// long gone.
include: ["src/**/*.spec.{ts,tsx}"],
},
});