-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 913 Bytes
/
test.yml
File metadata and controls
35 lines (29 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Run Tests
on:
push:
branches:
- main # Run on pushes to the main branch (or adjust as needed)
- '**'
pull_request:
branches:
- main # Run on pull requests to the main branch
jobs:
test:
runs-on: windows-latest # Run on a Linux runner (you can also use macos-latest or windows-latest)
steps:
# Step 1: Check out the repository
- name: Checkout code
uses: actions/checkout@v2
# Step 2: Set up Node.js (adjust version as needed)
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '22.12.0' # Use the version of Node.js you require
# Step 3: Install dependencies
- name: Install dependencies
run: |
npm install
# Step 4: Run tests using Mocha
- name: Run tests
run: |
npm test # This assumes you have a "test" script defined in your package.json