Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nkangan committed Oct 20, 2023
2 parents ed917bf + 1090541 commit 3bc0ba5
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 115 deletions.
49 changes: 24 additions & 25 deletions .github/workflows/pytest_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,32 @@ on:
push:
branches:
- "main"

jobs:
build:

runs-on: ubuntu-latest
env:
MONGO_USER: ${{ secrets.MONGO_USER }}
MONGO_PASS: ${{ secrets.MONGO_PASS }}
MONGO_USER: ${{ secrets.MONGO_USER }}
MONGO_PASS: ${{ secrets.MONGO_PASS }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov coverage
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r ./backend/requirements.txt
- name: Test with pytest, upload to codecov
run: |
cd ./backend
echo 'Created application.yml'
pwd
pytest --cov-report xml:cov.xml --cov=./ ./
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov coverage
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r ./backend/requirements.txt
- name: Test with pytest, upload to codecov
run: |
cd ./backend
echo 'Created application.yml'
pwd
pytest --cov-report xml:cov.xml --cov=./ ./
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion backend/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def client():
password = info["password"]
app.config["MONGODB_SETTINGS"] = {
"db": "appTracker",
"host": f'mongodb+srv://{username}:{password}@cluster0.en3fo.mongodb.net/todolistDB?retryWrites="true"&w=majority',
"host": f'mongodb+srv://{username}:{password}@cluster0.en3fo.mongodb.net/todolistDB?retryWrites=true&w=majority',
}
db = MongoEngine()
db.disconnect()
Expand Down
Loading

0 comments on commit 3bc0ba5

Please sign in to comment.