forked from ChakshuGautam/geoquery.in
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 900 Bytes
/
test.yaml
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
36
37
38
name: Unit Test
on:
push:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: ./geoip # Set the path to your project root directory
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm install
working-directory: ./geoip/server # Set the working directory to your project root
- name: Run jest test
run: npx jest --coverage
working-directory: ./geoip/server # Set the working directory to your project root
- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: test-results
path: ./geoip/coverage