#115 #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |