Merge pull request #76 from renathossain/feat/test-prescriptions #13
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: backend - on Push to main | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "backend/**" | |
jobs: | |
python: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
npm i cross-os | |
pip install -r requirements.txt | |
- name: Start MongoDB | |
uses: supercharge/mongodb-github-action@1.10.0 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'v21.7.1' | |
- name: Install npm packages | |
run: | | |
cd backend/auth_service | |
npm install express | |
- name: Test backend | |
run: | | |
echo "Starting Servers" | |
node backend/api_gateway/src/index.js | |
sleep 5 | |
echo "Testing unique prescriber codes and pdf generation" | |
python -m unittest backend/verification_service/test/code_pdf_tests.py | |
echo "Testing authentication service" | |
python backend/auth_service/tests.py |