Skip to content

Commit 767c921

Browse files
committed
test: add pr-check workflow
1 parent 0b37be0 commit 767c921

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/pr-check.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: PR Checker
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, reopened]
5+
workflow_dispatch:
6+
7+
# cancel a previous check if running
8+
# this avoids concurrent checks when multiple commits
9+
# are pushed to a PR branch in a short time frame
10+
# head_ref || ref_name ensures a value exists.
11+
concurrency:
12+
group: cb-${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
run-tests:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: "20"
23+
- name: tests
24+
run: |
25+
npm ci
26+
npm test

0 commit comments

Comments
 (0)