Skip to content

Commit

Permalink
Add on CI - coverage report and flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
alexiusstrauss committed Aug 29, 2021
1 parent 8a38368 commit 5776816
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,36 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install depedencies
run: |
python3 -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run migrations
run: python3 manage.py migrate

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Coverage report
run: |
pip install coverage
coverage run manage.py test
coverage report
- name: Django tests
run: |
python3 manage.py test
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ ipython==7.19.0
coverage==5.5
pytest==6.1.2
pytest-cov==2.10.1
pytest-django==4.1.0
pytest-django==4.1.0
flake8

0 comments on commit 5776816

Please sign in to comment.