Merge pull request #161 from Frnn4268/Frnn #21
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: Build and Test | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
services: | |
mongo: | |
image: mongo:latest | |
ports: | |
- 27017:27017 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: | | |
cd frontend | |
npm install | |
cd ../backend | |
npm install | |
- name: Build frontend | |
run: | | |
cd frontend | |
npm run build | |
- name: Build backend | |
run: | | |
cd backend | |
npm run build | |
- name: Run tests | |
run: | | |
# cd frontend | |
# npm test | |
# cd .. | |
cd backend | |
npm test |