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
# This workflow will test the Source Collector App | |
# Utilizing the docker-compose file in the root directory | |
name: Test Source Collector App | |
on: pull_request | |
#jobs: | |
# build: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v4 | |
# - name: Run docker-compose | |
# uses: hoverkraft-tech/[email protected] | |
# with: | |
# compose-file: "docker-compose.yml" | |
# - name: Execute tests in the running service | |
# run: | | |
# docker ps -a && docker exec data-source-identification-app-1 pytest /app/tests/test_automated | |
jobs: | |
container-job: | |
runs-on: ubuntu-latest | |
container: python:3.12.8 | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run tests | |
run: | | |
pytest tests/test_automated | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
POSTGRES_HOST: postgres | |
POSTGRES_PORT: 5432 | |
GOOGLE_API_KEY: TEST |