Skip to content

Commit

Permalink
Merge 0ba6dbe into 8b7cdf2
Browse files Browse the repository at this point in the history
  • Loading branch information
leehanchung committed Apr 13, 2020
2 parents 8b7cdf2 + 0ba6dbe commit 398f51d
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 11 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,32 @@ on:
branches: [ staging, master ]
pull_request:
branches: [ staging, master ]



jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
- name: STEP 1. Check out repo
uses: actions/checkout@v2
#===============================================#
- name: STEP 2. Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install pipenv dependencies
#===============================================#
- name: STEP 3. Install pipenv dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
python -m pipenv install --dev --system
- name: Lint with pylint
#===============================================#
- name: STEP 4. Lint with pylint
run: |
pipenv run pylint --rcfile=.pylintrc api
- name: Test with pytest
#===============================================#
- name: STEP 5. Test with pytest
env:
MONGODB_CONNECTION_URI: ${{ secrets.MONGODB_CONNECTION_URI }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
Expand All @@ -39,6 +43,10 @@ jobs:
STATE_DEATH: ${{ secrets.STATE_DEATH }}
NYT_STATE: ${{ secrets.NYT_STATE }}
run: |
echo $MONGODB_CONNECTION_URI
echo $TWITTER_CONSUMER_KEY
pytest
coverage run --omit */.virtualenvs/* -m pytest api
#===============================================#
- name: STEP 6. Generate coverage reports
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN}}
run: |
coveralls
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ black = "*"
pylint = "*"
pytest = "*"
coverage = "*"
coveralls = "*"

[requires]
python_version = "3.7"
Expand Down
52 changes: 51 additions & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
![Version: v0.1.5](https://img.shields.io/badge/release-v0.1.5-blue)
![Python Version](https://img.shields.io/badge/python-v3.7-blue)
![Build](https://img.shields.io/badge/build-passing-brightgreen)
[![Coverage Status](https://coveralls.io/repos/github/ncov19-us/back-end/badge.svg?branch=coverall)](https://coveralls.io/github/ncov19-us/back-end?branch=coverall)
[![CodeFactor](https://www.codefactor.io/repository/github/ncov19-us/back-end/badge)](https://www.codefactor.io/repository/github/ncov19-us/back-end)

#### Backend delpoyed at 👉 [Public API](https://api.ncov19.us/) <br>
Expand Down

0 comments on commit 398f51d

Please sign in to comment.