File tree Expand file tree Collapse file tree 7 files changed +23
-6
lines changed Expand file tree Collapse file tree 7 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 64
64
- name : Run unit tests with green
65
65
run : |
66
66
export FLASK_APP=service:app
67
- pytest --disable-warnings
67
+ pytest --pspec --cov=service --cov-fail-under=95 -- disable-warnings
68
68
env :
69
69
DATABASE_URI : " postgresql://postgres:pgs3cr3t@postgres:5432/testdb"
70
70
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ lint: ## Run the linter
26
26
27
27
test : # # Run the unit tests
28
28
$(info Running tests...)
29
- pytest --disable-warnings
29
+ green -vvv --processes=1 --run-coverage --termcolor --minimum-coverage=95
30
30
31
31
# #@ Runtime
32
32
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ python-dotenv==1.0.0
6
6
pytest == 7.4.0
7
7
pytest-pspec == 0.0.4
8
8
pytest-cov == 4.1.0
9
+ green == 3.4.3
9
10
10
11
# Code quality
11
12
pylint == 2.17.5
Original file line number Diff line number Diff line change 1
1
[tool:pytest]
2
2
minversion = 6.0
3
- addopts = --pspec --cov =. --disable-warnings
3
+ addopts = --pspec --cov =. --cov-fail-under =95 -- disable-warnings
4
4
testpaths =
5
5
tests
6
6
integration
@@ -10,3 +10,11 @@ show_missing = True
10
10
11
11
[pylint.'MESSAGES CONTROL']
12
12
disable =E1101
13
+
14
+ [green]
15
+ verbose =3
16
+ processes =1
17
+ run-coverage =1
18
+ termcolor =1
19
+ # minimum-coverage=95
20
+ # junit-report=./unittests.xml
Original file line number Diff line number Diff line change 5
5
- The API must be RESTful.
6
6
- The endpoint must be called `/counters`.
7
7
- When creating a counter, you must specify the name in the path.
8
- - Duplicate names must return a conflict error code.
8
+ - Duplicate names must return a 409 conflict error code.
9
9
- The service must be able to update a counter by name.
10
10
- The service must be able to get a counter's current value.
11
11
- The service must be able to delete a counter.
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ black==23.7.0
21
21
pytest == 7.4.0
22
22
pytest-pspec == 0.0.4
23
23
pytest-cov == 4.1.0
24
-
24
+ green == 3.4.3
25
25
factory-boy == 3.3.0
26
26
coverage == 7.3.0
27
27
Original file line number Diff line number Diff line change 1
1
# setup configuration for tools
2
2
[tool:pytest]
3
3
minversion = 6.0
4
- addopts = --pspec --cov =service --disable-warnings
4
+ addopts = --pspec --cov =service --cov-fail-under =95 -- disable-warnings
5
5
testpaths =
6
6
tests
7
7
integration
8
8
9
+ [green]
10
+ verbose =3
11
+ processes =1
12
+ run-coverage =1
13
+ termcolor =1
14
+ minimum-coverage =95
15
+ # junit-report=./unittests.xml
16
+
9
17
[flake8]
10
18
max-line-length = 127
11
19
per-file-ignores =
You can’t perform that action at this time.
0 commit comments