fix: updated pytest yaml to handle mongo db #91
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
name: Tests | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
jobs: | ||
run-tests: | ||
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: | ||
- name: Check out repository | ||
uses: actions/checkout@main | ||
with: | ||
ref: main | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@main | ||
with: | ||
python-version: 3.x | ||
- name: Install project and dependencies | ||
run: pip install . | ||
- name: Install additional dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install nbconvert pytest pytest-cov | ||
- name: Test with pytest | ||
run: | | ||
pytest --cov=process_bigraph |