Skip to content

Commit 0319035

Browse files
author
Hugo Osvaldo Barrera
committed
Don't run unit/system tests for each storage
The current storage (DAV_SERVER) has no impact on unit tests and system tests, so rather than run all these tests for each server, just run them once per python.
1 parent 6c6da2f commit 0319035

File tree

3 files changed

+39
-12
lines changed

3 files changed

+39
-12
lines changed

.travis.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,40 +25,56 @@
2525
"python": "3.6"
2626
},
2727
{
28-
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release ",
28+
"env": "BUILD=test REQUIREMENTS=release",
2929
"python": "3.5"
3030
},
3131
{
32-
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=release ",
32+
"env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=release ",
3333
"python": "3.5"
3434
},
3535
{
36-
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal ",
36+
"env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=release ",
3737
"python": "3.5"
3838
},
3939
{
40-
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=minimal ",
40+
"env": "BUILD=test REQUIREMENTS=minimal",
4141
"python": "3.5"
4242
},
4343
{
44-
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release ",
44+
"env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=minimal ",
45+
"python": "3.5"
46+
},
47+
{
48+
"env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=minimal ",
49+
"python": "3.5"
50+
},
51+
{
52+
"env": "BUILD=test REQUIREMENTS=release",
4553
"python": "3.6"
4654
},
4755
{
48-
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=release ",
56+
"env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=release ",
4957
"python": "3.6"
5058
},
5159
{
52-
"env": "BUILD=test DAV_SERVER=fastmail REQUIREMENTS=release ",
60+
"env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=release ",
61+
"python": "3.6"
62+
},
63+
{
64+
"env": "BUILD=test-storage DAV_SERVER=fastmail REQUIREMENTS=release ",
5365
"if": "NOT (type IN (pull_request))",
5466
"python": "3.6"
5567
},
5668
{
57-
"env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal ",
69+
"env": "BUILD=test REQUIREMENTS=minimal",
70+
"python": "3.6"
71+
},
72+
{
73+
"env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=minimal ",
5874
"python": "3.6"
5975
},
6076
{
61-
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=minimal ",
77+
"env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=minimal ",
6278
"python": "3.6"
6379
},
6480
{

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,16 @@ export TESTSERVER_BASE := ./tests/storage/servers/
4646
CODECOV_PATH = /tmp/codecov.sh
4747

4848
ifeq ($(CI), true)
49+
test-storage:
50+
curl -s https://codecov.io/bash > $(CODECOV_PATH)
51+
$(PYTEST) tests/storage/
52+
bash $(CODECOV_PATH) -c -F storage
4953
test:
5054
curl -s https://codecov.io/bash > $(CODECOV_PATH)
5155
$(PYTEST) tests/unit/
5256
bash $(CODECOV_PATH) -c -F unit
5357
$(PYTEST) tests/system/
5458
bash $(CODECOV_PATH) -c -F system
55-
$(PYTEST) tests/storage/
56-
bash $(CODECOV_PATH) -c -F storage
5759
else
5860
test:
5961
$(PYTEST)
@@ -81,6 +83,10 @@ install-test: install-servers install-dev
8183
fi
8284
[ -z "$(TEST_EXTRA_PACKAGES)" ] || pip install $(TEST_EXTRA_PACKAGES)
8385

86+
install-test-storage: install-test
87+
# This is just an alias
88+
true
89+
8490
install-style: install-docs install-dev
8591
pip install -U flake8 flake8-import-order flake8-bugbear
8692

scripts/make_travisconf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,18 @@
4545
):
4646
dav_servers = ("radicale", "xandikos")
4747

48+
matrix.append({
49+
'python': python,
50+
'env': f"BUILD=test REQUIREMENTS={requirements}",
51+
})
52+
4853
if python == latest_python and requirements == "release":
4954
dav_servers += ("fastmail",)
5055

5156
for dav_server in dav_servers:
5257
job = {
5358
'python': python,
54-
'env': ("BUILD=test "
59+
'env': ("BUILD=test-storage "
5560
"DAV_SERVER={dav_server} "
5661
"REQUIREMENTS={requirements} "
5762
.format(dav_server=dav_server,

0 commit comments

Comments
 (0)