Skip to content

Commit

Permalink
Merge pull request #292 from Chukwuemeka-James/GAIO01
Browse files Browse the repository at this point in the history
Added Web App workflow
  • Loading branch information
djeck1432 authored Nov 26, 2024
2 parents 23b3ce9 + 27f0651 commit 5e94fc0
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/wep_app_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Web App CI Workflow

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
run_tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5433:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies for Web_App
working-directory: ./apps/web_app
run: |
echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV
poetry lock --no-update
poetry install
- name: Run Tests for Web_App
working-directory: ./apps/web_app
run: |
cp .env.test .env
poetry run pytest --junitxml=results.xml
- name: Upload Test Results
uses: actions/upload-artifact@v3
with:
name: test-results
path: ./apps/web_app/results.xml
10 changes: 10 additions & 0 deletions apps/web_app/.env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
DB_NAME=#
DB_USER=#
DB_PASSWORD=#
DB_HOST=db
DB_PORT=#
IP_INFO_TOKEN=#
TELEGRAM_TOKEN= # token telegram from botfather
REDIS_HOST=redis
REDIS_PORT=6379
DATA_HANDLER_URL=# url to data handler

0 comments on commit 5e94fc0

Please sign in to comment.