-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Folder structure added * settings fixed * Docker Setup (#3) * Docker Setup * User model initilised with fyle_rest_auth (#4) * User model initilised with fyle_rest_auth * Pytest Setup and flake8 added (#5) * Pytest Setup and flake8 added * Workspace APIs Added (#6) * Workspace APIs Added * Github action added for tests * Export Settings APIs
- Loading branch information
Showing
73 changed files
with
2,240 additions
and
43 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,2 @@ | ||
[run] | ||
omit = ./venv/*, ms_business_central_api/*, *forms.py, *apps.py,*manage.py,*__init__.py,apps/*/migrations/*.py,*asgi*,*wsgi*,*admin.py,*urls.py,*settings.py, *gunicorn*, |
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,2 @@ | ||
setup.sh | ||
cache.db |
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,31 @@ | ||
[flake8] | ||
extend-ignore = | ||
# Comparison to true should be 'if cond is true:' or 'if cond:' | ||
E712, | ||
# Comparison to None should be 'cond is None:' (E711) | ||
E711, | ||
# Line break occurred before a binary operator (W503) | ||
W503, | ||
# Missing whitespace after ',', ';', or ':' (E231) | ||
E231, | ||
# Line too long (82 > 79 characters) (E501) | ||
E501, | ||
# E251 unexpected spaces around keyword / parameter equals | ||
E251, | ||
# E502 the backslash is redundant between brackets | ||
E502, | ||
# E128 continuation line under-indented for visual indent | ||
E128, | ||
# E125 continuation line with same indent as next logical line | ||
E125, | ||
# E131 continuation line unaligned for hanging indent | ||
E131, | ||
# E129 visually indented line with same indent as next logical line | ||
E129, | ||
# Multiple spaces after ',' (E241) | ||
E241 | ||
max-line-length = 99 | ||
max-complexity = 19 | ||
ban-relative-imports = true | ||
select = B,C,E,F,N,W,I25 | ||
exclude=*env |
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,30 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
pull_request: | ||
types: [assigned, opened, synchronize, reopened] | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
environment: CI Environment | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Bring up Services and Run Tests | ||
run: | | ||
docker-compose -f docker-compose-pipeline.yml build | ||
docker-compose -f docker-compose-pipeline.yml up -d | ||
docker-compose -f docker-compose-pipeline.yml exec -T api pytest tests/ --cov --junit-xml=test-reports/report.xml --cov-report=xml --cov-fail-under=70 | ||
echo "STATUS=$(cat pytest-coverage.txt | grep 'Required test' | awk '{ print $1 }')" >> $GITHUB_ENV | ||
echo "FAILED=$(cat test-reports/report.xml | awk -F'=' '{print $5}' | awk -F' ' '{gsub(/"/, "", $1); print $1}')" >> $GITHUB_ENV | ||
- name: Upload coverage reports to Codecov with GitHub Action | ||
uses: codecov/codecov-action@v3 | ||
- name: Pytest coverage comment | ||
uses: MishaKav/pytest-coverage-comment@main | ||
if: ${{ always() && github.ref != 'refs/heads/master' }} | ||
with: | ||
create-new-comment: true | ||
junitxml-path: ./test-reports/report.xml | ||
- name: Evaluate Coverage | ||
if: ${{ (env.STATUS == 'FAIL') || (env.FAILED > 0) }} | ||
run: exit 1 |
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
Oops, something went wrong.