Skip to content

updating the workflow file to close the server that was started #22

updating the workflow file to close the server that was started

updating the workflow file to close the server that was started #22

Workflow file for this run

name: Node.js CI
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20.x'
- run: cd backend && npm install
- run: cd backend && npm build
- run: cd backend && npm start
- run: cd backend && npm run test
- run: |
SERVER_PID=$(ps aux | grep 'node dist/server.js' | grep -v grep | awk '{print $2}')
kill $SERVER_PID