Skip to content

Commit d301f69

Browse files
committed
chore: add GitHub Actions workflow for Node.js tests
1 parent d2d3c26 commit d301f69

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Node.js Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
cache: 'npm'
21+
cache-dependency-path: nodejs/package-lock.json
22+
23+
- name: Install dependencies
24+
working-directory: nodejs
25+
run: npm ci
26+
27+
- name: Run tests
28+
working-directory: nodejs
29+
env:
30+
HACKMD_ACCESS_TOKEN: "test_token_123456789"
31+
run: npm test

0 commit comments

Comments
 (0)