Skip to content

Commit

Permalink
setup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamad11Dab committed May 26, 2024
1 parent 7dbe318 commit 720bd5a
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-latest

services:
postgres:
image: postgis/postgis
env:
POSTGRES_DB: ride
POSTGRES_USER: administrator
POSTGRES_PASSWORD: verySecretPassword
ports:
- 5432:5432
# Options to keep the container running until the end of the job
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r application/requirements.txt
- name: Run tests
run: |
export SQLALCHEMY_DATABASE_URI=postgresql+psycopg://administrator:verySecretPassword@localhost:5432/ride
python -m unittest discover -s application/app/tests
- name: Docker Compose Down
if: always()
run: docker-compose down

0 comments on commit 720bd5a

Please sign in to comment.