generated from nyu-software-engineering/final-project
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (32 loc) · 979 Bytes
/
python-app-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# .github/workflows/python-app.yml
name: Python application CI
on: [push, pull_request]
jobs:
build:
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
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8' # Choose the Python version you need
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# 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