diff --git a/.github/workflows/notion-cli.yml b/.github/workflows/notion-cli.yml index aa0a243..c3639e0 100644 --- a/.github/workflows/notion-cli.yml +++ b/.github/workflows/notion-cli.yml @@ -2,6 +2,7 @@ name: notion-cli on: push: + branches: [main] paths: - "notion-cli/**" pull_request: @@ -9,6 +10,10 @@ on: - "notion-cli/**" workflow_dispatch: # allow manual runs +concurrency: + group: notion-cli-${{ github.ref }} + cancel-in-progress: true + defaults: run: working-directory: notion-cli diff --git a/notion-cli/package.json b/notion-cli/package.json index fc1a59a..13a7304 100644 --- a/notion-cli/package.json +++ b/notion-cli/package.json @@ -10,7 +10,7 @@ "build": "tsc", "prepare": "npm run build", "cli": "npx tsx cli.ts", - "test": "node --import tsx --test ./test/docs.test.ts ./test/user.test.ts ./test/search.test.ts ./test/page.test.ts ./test/block.test.ts ./test/comment.test.ts ./test/database.test.ts ./test/datasource.test.ts ./test/file.test.ts ./test/integration-cmd.test.ts", + "test": "node --import tsx --test --test-concurrency=1 ./test/docs.test.ts ./test/user.test.ts ./test/search.test.ts ./test/page.test.ts ./test/block.test.ts ./test/comment.test.ts ./test/database.test.ts ./test/datasource.test.ts ./test/file.test.ts ./test/integration-cmd.test.ts", "test:docs": "node --import tsx --test ./test/docs.test.ts", "test:user": "node --import tsx --test ./test/user.test.ts", "test:search": "node --import tsx --test ./test/search.test.ts",