Skip to content

Added More Test Cases #242

Added More Test Cases

Added More Test Cases #242

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkoutcode
uses: actions/checkout@v3
- name: Build docker with new method
uses: isbang/[email protected]
with:
compose-file: "docker-compose.yml"
down-flags: "--volumes"
services: |
elasticsearch
web
- name: Check the website status
run: |
ls -a
echo "Sleeping for 60 seconds"
sleep 45
docker ps -a
if curl -s http://localhost:5000/ | grep "Login to UofT Event Hub"
then
echo "Login page detected. PR can be merged!"
else
echo "Login page not detected. PR can't be allowed to merge!"
exit 1
fi
- name: Check the unit tests status
run: |
echo "Running unit tests"
docker exec -i web-server bash -c "cd /tests && python -m pytest"