-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sumandari
committed
Aug 20, 2021
1 parent
ae9478f
commit 352fb75
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[flake8] | ||
exclude = */docs/*,*/.tox/*,*/.venv/*,*/.pycharm_helpers/*,*/migrations/*,docs/*,*/__init__.py, | ||
*/manage.py,*/wsgi.py, | ||
# we don't check this for now, until it's been fixed. otherwise it will throw lot of errors | ||
qgis-app/plugins/*, | ||
qgis-app/userexport/*, | ||
qgis-app/lib/templatetags/*, | ||
vagrant_assets/*, | ||
qgis-app/users/*, | ||
qgis-app/settings*, | ||
qgis-app/qgis_context_processor.py, | ||
qgis-app/search_sites.py, | ||
qgis-app/urls.py, | ||
qgis-app/custom_haystack_urls.py, | ||
qgis-app/middleware.py, | ||
qgis-app/homepage.py | ||
max-line-length = 79 | ||
|
||
# E12x continuation line indentation | ||
# E251 no spaces around keyword / parameter equals | ||
# E303 too many blank lines (3) | ||
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E251,E303,W503,W504,W60,F405 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: pr-test | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: | ||
- 3.7 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
|
||
- name: Test installing development dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
- name: Run Flake8 test | ||
run: flake8 . | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lint | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run docker-compose build | ||
working-directory: dockerize | ||
run: docker-compose build | ||
- name: Run the containers | ||
working-directory: dockerize | ||
run: docker-compose up -d db devweb | ||
- name: Run Coverage test | ||
working-directory: dockerize | ||
run: | | ||
cat << EOF | docker-compose exec -T devweb bash | ||
pip install coverage | ||
python manage.py makemigrations | ||
python manage.py migrate | ||
coverage run manage.py test | ||
coverage xml | ||
EOF | ||
- name: Upload coverage to codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |