mirror of
https://github.com/simple-login/app.git
synced 2025-02-23 15:23:27 +08:00
Improve and refactor testing.
This commit is contained in:
parent
b490acead8
commit
3a5f077bbf
4 changed files with 17 additions and 2 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
@ -65,7 +65,7 @@ jobs:
|
||||||
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
pytest --cov=. --cov-report=term:skip-covered --cov-report=html:htmlcov --cov-fail-under=60
|
pytest
|
||||||
|
|
||||||
- name: Archive code coverage results
|
- name: Archive code coverage results
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
|
10
coverage.ini
Normal file
10
coverage.ini
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[run]
|
||||||
|
branch = True
|
||||||
|
source = .
|
||||||
|
|
||||||
|
[report]
|
||||||
|
fail_under = 55
|
||||||
|
omit =
|
||||||
|
app/fake_data.py
|
||||||
|
oauth_tester.py
|
||||||
|
skip_covered = True
|
5
pytest.ini
Normal file
5
pytest.ini
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
[pytest]
|
||||||
|
addopts =
|
||||||
|
--cov
|
||||||
|
--cov-config coverage.ini
|
||||||
|
--cov-report=html:htmlcov
|
|
@ -9,4 +9,4 @@ sleep 5
|
||||||
|
|
||||||
poetry run pytest
|
poetry run pytest
|
||||||
|
|
||||||
docker rm -f sl-test-db
|
docker rm -f sl-test-db
|
||||||
|
|
Loading…
Reference in a new issue