Skip to content

Commit

Permalink
test requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshod5 committed May 13, 2024
1 parent 2890e6b commit f4b7fa2
Showing 1 changed file with 13 additions and 31 deletions.
44 changes: 13 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,21 @@
name: CI
on: [ push, pull_request ]
jobs:
test:
build:
runs-on: ubuntu-latest
container:
image: myimage/django-server:base
ports:
- 8000:8000

services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: admin
POSTGRES_DB: mydb
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

env:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_PASSWORD: admin
POSTGRES_USER: postgres

steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- uses: actions/checkout@v2

- name: Run PyTest
run: |
- name: Build and run with Docker Compose
run: |
docker-compose up -f "dev/docker/docker-compose.yml" up -d --build --abort-on-container-exitup
- name: Run PyTest
run: |
pip install pytest
pytest tests/test_mock_db.py --data-path=data/metadata/mini
pytest tests/test_mock_db.py --data-path=data/metadata/mini

0 comments on commit f4b7fa2

Please sign in to comment.