Skip to content

Commit

Permalink
ci fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
fishlesswater committed Dec 19, 2023
1 parent aa5117c commit f03486f
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/python-app-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ jobs:

runs-on: ubuntu-latest

services:
mongodb:
image: mongo
ports:
- 27017:27017
options: >-
--health-cmd "mongo --eval 'db.runCommand({ping: 1})'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2

Expand All @@ -22,9 +33,10 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
# Add steps to set up your database here if needed
# If your tests require the database to be in a certain state, add steps here

- name: Run tests
env:
MONGO_URI: mongodb://localhost:27017/test_db # replace 'test_db' with your database name
run: |
python -m pytest tests
python -m pytest tests

0 comments on commit f03486f

Please sign in to comment.