-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (39 loc) · 1 KB
/
main_test.yml
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
39
40
41
42
43
44
name: Test API server
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
defaults:
run:
shell: bash -l {0}
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest]
node-version: [16] # node 16 is used in production
runs-on: ${{ matrix.platform }}
steps:
- name: Main checkout
uses: actions/checkout@v4
with:
path: main
- name: Checkout Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Checkout resources private repo
uses: actions/checkout@v4
with:
repository: geoapi-pt/resources
token: ${{ secrets.GH_PAT }}
path: resources
- name: List project root direcotory
run: ls ${GITHUB_WORKSPACE} -lh
- name: Install npm packages
run: |
cd ${GITHUB_WORKSPACE}/resources && npm ci
cd ${GITHUB_WORKSPACE}/main && npm ci
- name: Main Test
run: cd ${GITHUB_WORKSPACE}/main && npm test