Skip to content

Commit 293120a

Browse files
authored
Merge pull request #26 from nyu-devops/revert-green
Added green back as alternate
2 parents 3697724 + b32e923 commit 293120a

File tree

7 files changed

+23
-6
lines changed

7 files changed

+23
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- name: Run unit tests with green
6565
run: |
6666
export FLASK_APP=service:app
67-
pytest --disable-warnings
67+
pytest --pspec --cov=service --cov-fail-under=95 --disable-warnings
6868
env:
6969
DATABASE_URI: "postgresql://postgres:pgs3cr3t@postgres:5432/testdb"
7070

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ lint: ## Run the linter
2626

2727
test: ## Run the unit tests
2828
$(info Running tests...)
29-
pytest --disable-warnings
29+
green -vvv --processes=1 --run-coverage --termcolor --minimum-coverage=95
3030

3131
##@ Runtime
3232

lab/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ python-dotenv==1.0.0
66
pytest==7.4.0
77
pytest-pspec==0.0.4
88
pytest-cov==4.1.0
9+
green==3.4.3
910

1011
# Code quality
1112
pylint==2.17.5

lab/setup.cfg

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool:pytest]
22
minversion = 6.0
3-
addopts = --pspec --cov=. --disable-warnings
3+
addopts = --pspec --cov=. --cov-fail-under=95 --disable-warnings
44
testpaths =
55
tests
66
integration
@@ -10,3 +10,11 @@ show_missing = True
1010

1111
[pylint.'MESSAGES CONTROL']
1212
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

lab/test_counter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- The API must be RESTful.
66
- The endpoint must be called `/counters`.
77
- 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.
99
- The service must be able to update a counter by name.
1010
- The service must be able to get a counter's current value.
1111
- The service must be able to delete a counter.

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ black==23.7.0
2121
pytest==7.4.0
2222
pytest-pspec==0.0.4
2323
pytest-cov==4.1.0
24-
24+
green==3.4.3
2525
factory-boy==3.3.0
2626
coverage==7.3.0
2727

setup.cfg

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# setup configuration for tools
22
[tool:pytest]
33
minversion = 6.0
4-
addopts = --pspec --cov=service --disable-warnings
4+
addopts = --pspec --cov=service --cov-fail-under=95 --disable-warnings
55
testpaths =
66
tests
77
integration
88

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+
917
[flake8]
1018
max-line-length = 127
1119
per-file-ignores =

0 commit comments

Comments
 (0)