Skip to content

Commit 96ed9d6

Browse files
committed
🔧 chore[workflow]: setup github workflow
1 parent 317ec35 commit 96ed9d6

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

‎.github/workflows/node.js.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: ["master", "develop"]
9+
pull_request:
10+
branches: ["master", "develop"]
11+
12+
jobs:
13+
build:
14+
runs-on: self-hosted
15+
16+
strategy:
17+
matrix:
18+
node-version: [22.x]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
working-directory: milkyway-bot/report-server
24+
run: |
25+
npm install actions/setup-node@v4
26+
actions/setup-node@v4
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: 'npm'
30+
- run: npm ci
31+
working-directory: milkyway-bot/report-server
32+
33+
- run: npm run build --if-present
34+
working-directory: milkyway-bot/report-server
35+
36+
- run: npm test
37+
working-directory: milkyway-bot/report-server

0 commit comments

Comments
 (0)