Skip to content

Commit a9d95a6

Browse files
authored
Merge pull request #32 from hackmdio/chore/unit-test-workflow
Chore/unit-test-workflow
2 parents d2d3c26 + bd1e831 commit a9d95a6

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Node.js CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
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 lint
28+
working-directory: nodejs
29+
run: npm run lint
30+
31+
- name: Build
32+
working-directory: nodejs
33+
run: npm run build
34+
35+
- name: Run tests
36+
working-directory: nodejs
37+
env:
38+
HACKMD_ACCESS_TOKEN: "test_token_123456789"
39+
run: npm test

0 commit comments

Comments
 (0)