Skip to content

Commit 77e5b6e

Browse files
authored
Merge pull request #2 from hanool/feature/add_github_action_pull_request
feature: add github actions that runs simple tests to check pull request
2 parents 1b0b7b4 + c88e56d commit 77e5b6e

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/pr-checks.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: PR Checks
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '24'
18+
cache: 'npm'
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Check dev server starts
24+
run: |
25+
timeout 30s npm run dev &
26+
sleep 10
27+
kill %1 || true
28+
29+
- name: Run tests
30+
run: npm run test
31+
32+
- name: Build and test output
33+
run: |
34+
npm run build
35+
node dist/index.js

0 commit comments

Comments
 (0)