Bump send and express #387
Workflow file for this run
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: Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "dev", "main" ] | |
pull_request: | |
branches: [ "dev", "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
NODE_ENV: ${{ vars.NODE_ENV }} | |
KEY: ${{ secrets.KEY }} | |
USER_TEST: ${{ secrets.USER_TEST }} | |
MAPBOX: ${{ secrets.MAPBOX }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- run: echo "NODE_ENV = $NODE_ENV" | |
- run: npm ci | |
- run: npm run build --if-present | |
- name: Start server | |
run: | | |
sudo NODE_ENV=$NODE_ENV KEY=$KEY USER_TEST=$USER_TEST MAPBOX=$MAPBOX npm start & | |
sleep 16 # Give server some time to start | |
- name: Check if server is running | |
run: | | |
curl --fail http://localhost:80 || exit 1 | |
- name: Run app tests | |
run: npm run test:app | |
- name: Run login tests | |
run: npm run test:login | |
- name: Run unit tests | |
run: npm run test:unit | |
- name: Run integration tests | |
run: npm run test:integration | |