Skip to content

Commit

Permalink
Fail fast in CI pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
jotare committed Jul 31, 2024
1 parent e1f6906 commit daa5dec
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 16 deletions.
1 change: 1 addition & 0 deletions nucliadb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ test-%:

test-cov-%:
$(PYTEST) \
-x \
--cov=nucliadb \
--cov-config=../.coveragerc \
--cov-report xml \
Expand Down
4 changes: 2 additions & 2 deletions nucliadb_dataset/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ lint:

.PHONY: test
test:
TEST_LOCAL_NUCLIADB=START pytest -rfE -s --tb=native -v tests
TEST_LOCAL_NUCLIADB=START pytest -rfE -sv --tb=native tests

.PHONY: test-cov
test-cov:
TEST_LOCAL_NUCLIADB=START pytest -rfE --cov=nucliadb_dataset --cov-config=../.coveragerc -s --tb=native -v --cov-report term-missing:skip-covered --cov-report xml --cov-append tests
TEST_LOCAL_NUCLIADB=START pytest -rfE -sxv --cov=nucliadb_dataset --cov-config=../.coveragerc --tb=native --cov-report term-missing:skip-covered --cov-report xml --cov-append tests
4 changes: 2 additions & 2 deletions nucliadb_models/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ lint:

.PHONY: test
test:
pytest -s --tb=native -v tests
pytest -sv --tb=native tests


.PHONY: test-cov
test-cov:
pytest -rfE --cov=nucliadb_models --cov-config=../.coveragerc -s --tb=native -v --cov-report term-missing:skip-covered --cov-report xml tests
pytest -rfE -sxv --cov=nucliadb_models --cov-config=../.coveragerc --tb=native --cov-report term-missing:skip-covered --cov-report xml tests
4 changes: 2 additions & 2 deletions nucliadb_node/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ lint:

.PHONY: test
test:
pytest -s --tb=native -v nucliadb_sidecar
pytest -sv --tb=native nucliadb_sidecar

.PHONY: test-cov
test-cov:
pytest -rfE --cov=nucliadb_sidecar --cov-config=../.coveragerc -s --tb=native -v --cov-report term-missing:skip-covered --cov-report xml nucliadb_sidecar
pytest -rfE -sxv --cov=nucliadb_sidecar --cov-config=../.coveragerc --tb=native --cov-report term-missing:skip-covered --cov-report xml nucliadb_sidecar

.PHONY: build
build:
Expand Down
5 changes: 3 additions & 2 deletions nucliadb_node_binding/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ lint:

.PHONY: test
test:
pytest -s --tb=native -v tests
pytest -sv --tb=native tests

# TODO rather complex set up, needs to be done globally
.PHONY: install-cov
Expand All @@ -28,7 +28,8 @@ install-cov:
.PHONY: test-cov
# test-cov:
# bash ./cov.sh
test-cov: test # Without coverage for now, since it's currently broken
test-cov: # Without coverage for now, since it's currently broken
pytest -sxv --tb=native tests

.PHONY: build
build:
Expand Down
4 changes: 2 additions & 2 deletions nucliadb_sdk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ lint:

.PHONY: test
test:
TEST_LOCAL_NUCLIADB=START pytest -rfE -s --tb=native -v tests
TEST_LOCAL_NUCLIADB=START pytest -rfE -sv --tb=native tests

.PHONY: test-cov
test-cov:
TEST_LOCAL_NUCLIADB=START pytest -rfE --cov=nucliadb_sdk --cov-config=../.coveragerc -s --tb=native -v --cov-report term-missing:skip-covered --cov-report xml tests
TEST_LOCAL_NUCLIADB=START pytest -rfE -sxv --cov=nucliadb_sdk --cov-config=../.coveragerc --tb=native --cov-report term-missing:skip-covered --cov-report xml tests
4 changes: 2 additions & 2 deletions nucliadb_sidecar/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ lint:

.PHONY: test
test:
pytest -s --tb=native -v tests
pytest -sv --tb=native tests

.PHONY: test-cov
test-cov:
pytest -rfE --cov=nucliadb_sidecar --cov-config=../.coveragerc -s --tb=native -v --cov-report term-missing:skip-covered --cov-report xml tests
pytest -rfE -sxv --cov=nucliadb_sidecar --cov-config=../.coveragerc --tb=native --cov-report term-missing:skip-covered --cov-report xml tests

.PHONY: build
build:
Expand Down
4 changes: 2 additions & 2 deletions nucliadb_telemetry/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ lint:

.PHONY: test
test:
pytest -s --tb=native -v tests
pytest -sv --tb=native tests

.PHONY: test-cov
test-cov:
pytest -rfE --cov=nucliadb_telemetry --cov-config=../.coveragerc -s --tb=native -v --cov-report term-missing:skip-covered --cov-report xml tests
pytest -rfE -sxv -cov=nucliadb_telemetry --cov-config=../.coveragerc --tb=native --cov-report term-missing:skip-covered --cov-report xml tests
4 changes: 2 additions & 2 deletions nucliadb_utils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ lint:

.PHONY: test
test:
pytest -s --tb=native -v tests
pytest -sv --tb=native tests

.PHONY: test-cov
test-cov:
pytest -rfE --cov=nucliadb_utils --cov-config=../.coveragerc -s --tb=native -v --cov-report term-missing:skip-covered --cov-report xml tests
pytest -rfE -sxv --cov=nucliadb_utils --cov-config=../.coveragerc --tb=native --cov-report term-missing:skip-covered --cov-report xml tests

0 comments on commit daa5dec

Please sign in to comment.