From 8ac4a003060032be326f73cef252cd5e62b45200 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Mon, 19 Oct 2020 20:46:35 +0200 Subject: [PATCH 01/10] Add support for Python 3.9 --- .travis.yml | 24 ++++++++++++++++++++++++ scripts/make_travisconf.py | 2 +- setup.py | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c104147..712e200 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,6 +73,30 @@ "env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=minimal ", "python": "3.8" }, + { + "env": "BUILD=test REQUIREMENTS=release", + "python": "3.9" + }, + { + "env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=release ", + "python": "3.9" + }, + { + "env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=release ", + "python": "3.9" + }, + { + "env": "BUILD=test REQUIREMENTS=minimal", + "python": "3.9" + }, + { + "env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=minimal ", + "python": "3.9" + }, + { + "env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=minimal ", + "python": "3.9" + }, { "env": "BUILD=test ETESYNC_TESTS=true REQUIREMENTS=latest", "python": "3.7" diff --git a/scripts/make_travisconf.py b/scripts/make_travisconf.py index 7c790e5..49fb0ce 100755 --- a/scripts/make_travisconf.py +++ b/scripts/make_travisconf.py @@ -2,7 +2,7 @@ import itertools import json -python_versions = ["3.7", "3.8"] +python_versions = ["3.7", "3.8", "3.9"] cfg = {} diff --git a/setup.py b/setup.py index d584b95..e8dd9c0 100644 --- a/setup.py +++ b/setup.py @@ -89,6 +89,7 @@ setup( 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Topic :: Internet', 'Topic :: Utilities', ], From 9df587df2601aa873553f7866494fb60f2fc5394 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Mon, 19 Oct 2020 21:43:15 +0200 Subject: [PATCH 02/10] Update CI image The former one does not support Python 3.9. --- .travis.yml | 2 +- scripts/make_travisconf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 712e200..c9bf874 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ ] }, "cache": "pip", - "dist": "bionic", + "dist": "focal", "git": { "submodules": false }, diff --git a/scripts/make_travisconf.py b/scripts/make_travisconf.py index 49fb0ce..8301dac 100755 --- a/scripts/make_travisconf.py +++ b/scripts/make_travisconf.py @@ -7,7 +7,7 @@ python_versions = ["3.7", "3.8", "3.9"] cfg = {} cfg['sudo'] = True -cfg['dist'] = 'bionic' +cfg['dist'] = 'focal' cfg['language'] = 'python' cfg['cache'] = 'pip' From 53878f001a2e6e055d7a228d3e2bba2c96fc45d0 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Mon, 16 Nov 2020 19:27:39 +0100 Subject: [PATCH 03/10] Horrible, nasty hack --- test-requirements.txt | 1 - tests/system/cli/test_sync.py | 64 ++++++++++++++++++++--------------- 2 files changed, 36 insertions(+), 29 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index b6e1181..e0dc9aa 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,4 +2,3 @@ hypothesis>=5.0.0 pytest pytest-cov pytest-localserver -pytest-subtesthack diff --git a/tests/system/cli/test_sync.py b/tests/system/cli/test_sync.py index 43d35dd..88163ed 100644 --- a/tests/system/cli/test_sync.py +++ b/tests/system/cli/test_sync.py @@ -271,6 +271,9 @@ def test_multiple_pairs(tmpdir, runner): } +hack = 0 + + # XXX: https://github.com/pimutils/vdirsyncer/issues/617 @pytest.mark.skipif(sys.platform == 'darwin', reason='This test inexplicably fails') @@ -291,40 +294,45 @@ def test_multiple_pairs(tmpdir, runner): @example(collections=['persönlich']) @example(collections={'a', 'A'}) @example(collections={'\ufffe'}) -def test_create_collections(subtest, collections): +def test_create_collections(collections, tmpdir, runner): + # Hypothesis calls this tests in a way that fixtures are not reset, to tmpdir is the + # same for each call. + # This horrible hack creates a new subdirectory on each run, effectively giving us a + # new tmpdir each run. + global hack + hack += 1 + tmpdir = tmpdir / f"sub{hack}" - @subtest - def test_inner(tmpdir, runner): - runner.write_with_general(dedent(''' - [pair foobar] - a = "foo" - b = "bar" - collections = {colls} + runner.write_with_general(dedent(''' + [pair foobar] + a = "foo" + b = "bar" + collections = {colls} - [storage foo] - type = "filesystem" - path = "{base}/foo/" - fileext = ".txt" + [storage foo] + type = "filesystem" + path = "{base}/foo/" + fileext = ".txt" - [storage bar] - type = "filesystem" - path = "{base}/bar/" - fileext = ".txt" - '''.format(base=str(tmpdir), colls=json.dumps(list(collections))))) + [storage bar] + type = "filesystem" + path = "{base}/bar/" + fileext = ".txt" + '''.format(base=str(tmpdir), colls=json.dumps(list(collections))))) - result = runner.invoke( - ['discover'], - input='y\n' * 2 * (len(collections) + 1) - ) - assert not result.exception, result.output + result = runner.invoke( + ['discover'], + input='y\n' * 2 * (len(collections) + 1) + ) + assert not result.exception, result.output - result = runner.invoke( - ['sync'] + ['foobar/' + x for x in collections] - ) - assert not result.exception, result.output + result = runner.invoke( + ['sync'] + ['foobar/' + x for x in collections] + ) + assert not result.exception, result.output - assert {x.basename for x in tmpdir.join('foo').listdir()} == \ - {x.basename for x in tmpdir.join('bar').listdir()} + assert {x.basename for x in tmpdir.join('foo').listdir()} == \ + {x.basename for x in tmpdir.join('bar').listdir()} def test_ident_conflict(tmpdir, runner): From 5ed9c821b860dcaf335f6b94bd73bbe5a2094481 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Tue, 2 Mar 2021 22:50:00 +0100 Subject: [PATCH 04/10] This should work, right? It's embarrassing that I didn't come up with something so simple before. --- tests/system/utils/test_main.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/system/utils/test_main.py b/tests/system/utils/test_main.py index 9df4e86..5611989 100644 --- a/tests/system/utils/test_main.py +++ b/tests/system/utils/test_main.py @@ -23,14 +23,12 @@ def test_get_storage_init_args(): assert not required -def test_request_ssl(httpsserver): - httpsserver.serve_content('') # we need to serve something - +def test_request_ssl(): with pytest.raises(requests.exceptions.ConnectionError) as excinfo: - http.request('GET', httpsserver.url) + http.request('GET', "https://self-signed.badssl.com/") assert 'certificate verify failed' in str(excinfo.value) - http.request('GET', httpsserver.url, verify=False) + http.request('GET', "https://self-signed.badssl.com/", verify=False) def _fingerprints_broken(): From 8608f37fbb46b933410597dcd0b10ee16e8e76b5 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Tue, 2 Mar 2021 23:06:07 +0100 Subject: [PATCH 05/10] Pin hypothesis --- test-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index e0dc9aa..a9388a3 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,4 @@ -hypothesis>=5.0.0 +hypothesis>=5.0.0,<6.0.0 pytest pytest-cov pytest-localserver From 255ea8f9bf721948141b4b286af6068071db0129 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Tue, 2 Mar 2021 23:09:22 +0100 Subject: [PATCH 06/10] This comparison actually does something --- tests/unit/utils/test_vobject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/utils/test_vobject.py b/tests/unit/utils/test_vobject.py index 44a5f8a..7995e73 100644 --- a/tests/unit/utils/test_vobject.py +++ b/tests/unit/utils/test_vobject.py @@ -352,4 +352,4 @@ def test_component_contains(): assert 'BAZ' not in item with pytest.raises(ValueError): - 42 in item + 42 in item # noqa: B015 From ef34d77ab17d122af93dc8e3da020c49018d62ca Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Mon, 5 Apr 2021 12:16:20 +0200 Subject: [PATCH 07/10] Use Sourcehut for CI --- .builds/style.yaml | 16 ++++++ .builds/tests-minimal.yaml | 25 ++++++++ .builds/tests-release.yaml | 24 ++++++++ .pre-commit-config.yaml | 10 ---- .travis.yml | 113 ------------------------------------- Makefile | 16 ++---- README.rst | 4 +- docs/contributing.rst | 4 +- scripts/make_ci_conf.py | 48 ++++++++++++++++ scripts/make_travisconf.py | 82 --------------------------- scripts/tests.template | 22 ++++++++ scripts/travis-install.sh | 10 ---- 12 files changed, 145 insertions(+), 229 deletions(-) create mode 100644 .builds/style.yaml create mode 100644 .builds/tests-minimal.yaml create mode 100644 .builds/tests-release.yaml delete mode 100644 .travis.yml create mode 100755 scripts/make_ci_conf.py delete mode 100755 scripts/make_travisconf.py create mode 100644 scripts/tests.template delete mode 100644 scripts/travis-install.sh diff --git a/.builds/style.yaml b/.builds/style.yaml new file mode 100644 index 0000000..12c5862 --- /dev/null +++ b/.builds/style.yaml @@ -0,0 +1,16 @@ +image: archlinux +packages: + - docker + - docker-compose + - python-pip +sources: + - https://github.com/pimutils/vdirsyncer +tasks: + - setup: | + cd vdirsyncer + make -e install-style + - test: | + cd vdirsyncer + # Non-system python is used for packages: + export PATH=$PATH:~/.local/bin/ + make -e style diff --git a/.builds/tests-minimal.yaml b/.builds/tests-minimal.yaml new file mode 100644 index 0000000..52d2abf --- /dev/null +++ b/.builds/tests-minimal.yaml @@ -0,0 +1,25 @@ +# TODO: Maybe shift this job to ubuntu/debian. +image: archlinux +packages: + - docker + - docker-compose + - python-pip +sources: + - https://github.com/pimutils/vdirsyncer +environment: + BUILD: test + CI: true + REQUIREMENTS: minimal + # TODO: ETESYNC_TESTS +tasks: + - setup: | + cd vdirsyncer + sudo systemctl start docker + DAV_SERVER="radicale xandikos" make -e install-test + - test: | + cd vdirsyncer + # Non-system python is used for packages: + export PATH=$PATH:~/.local/bin/ + make -e ci-test + DAV_SERVER=radicale make -e ci-test-storage + DAV_SERVER=xandikos make -e ci-test-storage diff --git a/.builds/tests-release.yaml b/.builds/tests-release.yaml new file mode 100644 index 0000000..0761054 --- /dev/null +++ b/.builds/tests-release.yaml @@ -0,0 +1,24 @@ +image: archlinux +packages: + - docker + - docker-compose + - python-pip +sources: + - https://github.com/pimutils/vdirsyncer +environment: + BUILD: test + CI: true + REQUIREMENTS: release + # TODO: ETESYNC_TESTS +tasks: + - setup: | + cd vdirsyncer + sudo systemctl start docker + DAV_SERVER="radicale xandikos" make -e install-test + - test: | + cd vdirsyncer + # Non-system python is used for packages: + export PATH=$PATH:~/.local/bin/ + make -e ci-test + DAV_SERVER=radicale make -e ci-test-storage + DAV_SERVER=xandikos make -e ci-test-storage diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8f0b7cd..c7e29c3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,6 @@ repos: - id: trailing-whitespace args: [--markdown-linebreak-ext=md] - id: end-of-file-fixer - exclude: '.travis.yml' - id: check-toml - id: check-added-large-files - id: debug-statements @@ -18,12 +17,3 @@ repos: rev: v2.3.0 hooks: - id: reorder-python-imports - - repo: local - hooks: - - id: update-travis - name: Update travis job definition - description: Ensures that travis job definition are up to date. - entry: scripts/make_travisconf.py - files: '.*travis.*' - stages: [commit] - language: script diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c9bf874..0000000 --- a/.travis.yml +++ /dev/null @@ -1,113 +0,0 @@ -{ - "branches": { - "only": [ - "master" - ] - }, - "cache": "pip", - "dist": "focal", - "git": { - "submodules": false - }, - "install": [ - ". scripts/travis-install.sh", - "make -e install-$BUILD" - ], - "language": "python", - "matrix": { - "fast_finish": true, - "include": [ - { - "env": "BUILD=style", - "python": "3.7" - }, - { - "env": "BUILD=test REQUIREMENTS=release", - "python": "3.7" - }, - { - "env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=release ", - "python": "3.7" - }, - { - "env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=release ", - "python": "3.7" - }, - { - "env": "BUILD=test-storage DAV_SERVER=fastmail REQUIREMENTS=release ", - "python": "3.7" - }, - { - "env": "BUILD=test REQUIREMENTS=minimal", - "python": "3.7" - }, - { - "env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=minimal ", - "python": "3.7" - }, - { - "env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=minimal ", - "python": "3.7" - }, - { - "env": "BUILD=test REQUIREMENTS=release", - "python": "3.8" - }, - { - "env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=release ", - "python": "3.8" - }, - { - "env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=release ", - "python": "3.8" - }, - { - "env": "BUILD=test REQUIREMENTS=minimal", - "python": "3.8" - }, - { - "env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=minimal ", - "python": "3.8" - }, - { - "env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=minimal ", - "python": "3.8" - }, - { - "env": "BUILD=test REQUIREMENTS=release", - "python": "3.9" - }, - { - "env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=release ", - "python": "3.9" - }, - { - "env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=release ", - "python": "3.9" - }, - { - "env": "BUILD=test REQUIREMENTS=minimal", - "python": "3.9" - }, - { - "env": "BUILD=test-storage DAV_SERVER=radicale REQUIREMENTS=minimal ", - "python": "3.9" - }, - { - "env": "BUILD=test-storage DAV_SERVER=xandikos REQUIREMENTS=minimal ", - "python": "3.9" - }, - { - "env": "BUILD=test ETESYNC_TESTS=true REQUIREMENTS=latest", - "python": "3.7" - } - ] - }, - "script": [ - "make -e $BUILD" - ], - "services": [ - "docker" - ], - "sudo": true -} \ No newline at end of file diff --git a/Makefile b/Makefile index fbe59b8..f24510f 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ export DETERMINISTIC_TESTS := false # Run the etesync testsuite. export ETESYNC_TESTS := false -# Assume to run in Travis. Don't use this outside of a virtual machine. It will +# Assume to run in CI. Don't use this outside of a virtual machine. It will # heavily "pollute" your system, such as attempting to install a new Python # systemwide. export CI := false @@ -41,17 +41,17 @@ export TESTSERVER_BASE := ./tests/storage/servers/ CODECOV_PATH = /tmp/codecov.sh ifeq ($(CI), true) -test-storage: - curl -s https://codecov.io/bash > $(CODECOV_PATH) - $(PYTEST) tests/storage/ - bash $(CODECOV_PATH) -c -F storage -test: +ci-test: curl -s https://codecov.io/bash > $(CODECOV_PATH) $(PYTEST) tests/unit/ bash $(CODECOV_PATH) -c -F unit $(PYTEST) tests/system/ bash $(CODECOV_PATH) -c -F system [ "$(ETESYNC_TESTS)" = "false" ] || make test-storage +ci-test-storage: + curl -s https://codecov.io/bash > $(CODECOV_PATH) + $(PYTEST) tests/storage/ + bash $(CODECOV_PATH) -c -F storage else test: $(PYTEST) @@ -79,10 +79,6 @@ install-test: install-servers install-dev fi [ -z "$(TEST_EXTRA_PACKAGES)" ] || pip install $(TEST_EXTRA_PACKAGES) -install-test-storage: install-test - # This is just an alias - true - install-style: install-docs install-dev pip install pre-commit diff --git a/README.rst b/README.rst index bfacf71..6ec3d66 100644 --- a/README.rst +++ b/README.rst @@ -2,8 +2,8 @@ vdirsyncer ========== -.. image:: https://travis-ci.org/pimutils/vdirsyncer.svg?branch=master - :target: https://travis-ci.org/pimutils/vdirsyncer +.. image:: https://builds.sr.ht/~whynothugo/vdirsyncer.svg + :target: https://builds.sr.ht/~whynothugo/vdirsyncer :alt: CI status .. image:: https://codecov.io/github/pimutils/vdirsyncer/coverage.svg?branch=master diff --git a/docs/contributing.rst b/docs/contributing.rst index 449638a..233ea71 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -75,8 +75,8 @@ Submitting patches, pull requests Running tests, how to set up your development environment --------------------------------------------------------- -For many patches, it might suffice to just let Travis run the tests. However, -Travis is slow, so you might want to run them locally too. For this, set up a +For many patches, it might suffice to just let CI run the tests. However, +CI is slow, so you might want to run them locally too. For this, set up a virtualenv_ and run this inside of it:: # install: diff --git a/scripts/make_ci_conf.py b/scripts/make_ci_conf.py new file mode 100755 index 0000000..a56c6b1 --- /dev/null +++ b/scripts/make_ci_conf.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python +from pathlib import Path + +REPO_ROOT = Path(__file__).parent.parent + +builds = [ + { + "BUILD": "style", + "REQUIREMENTS": "release", + "DAV_SERVER": "skip", + }, + { + "ETESYNC_TESTS": "true", + "BUILD": "test", + "REQUIREMENTS": "release", + "DAV_SERVER": "skip", + }, +] + +# XXX: Use `devel` here for recent python versions: +for requirements in ("release", "minimal"): + # XXX: `fastmail` has been left out here: + dav_servers = ("radicale", "xandikos") + + builds.append( + { + "BUILD": "test", + "REQUIREMENTS": requirements, + "DAV_SERVER": "skip", + }, + ) + + for dav_server in dav_servers: + job = { + "BUILD": "test-storage", + "REQUIREMENTS": requirements, + "DAV_SERVER": dav_server, + } + + +with open(REPO_ROOT / "scripts" / "tests.template") as f: + template = f.read() + +# TODO: Delete previous ones... + +for i, build in enumerate(builds): + with open(REPO_ROOT / ".builds" / f"{i}.yaml", "w") as f: + f.write(template.format(**build)) diff --git a/scripts/make_travisconf.py b/scripts/make_travisconf.py deleted file mode 100755 index 8301dac..0000000 --- a/scripts/make_travisconf.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python -import itertools -import json - -python_versions = ["3.7", "3.8", "3.9"] - -cfg = {} - -cfg['sudo'] = True -cfg['dist'] = 'focal' -cfg['language'] = 'python' -cfg['cache'] = 'pip' - -cfg['services'] = ['docker'] - -cfg['git'] = { - 'submodules': False -} - -cfg['branches'] = { - 'only': ['master'] -} - -cfg['install'] = """ -. scripts/travis-install.sh -make -e install-$BUILD -""".strip().splitlines() - -cfg['script'] = ["make -e $BUILD"] - -matrix = [] -cfg['matrix'] = {'include': matrix, 'fast_finish': True} - -matrix.append({ - 'python': python_versions[0], - 'env': 'BUILD=style' -}) - - -for python, requirements in itertools.product( - python_versions, - # XXX: Use `devel` here for recent python versions: - ("release", "minimal") -): - dav_servers = ("radicale", "xandikos") - - matrix.append({ - 'python': python, - 'env': f"BUILD=test REQUIREMENTS={requirements}", - }) - - if python == python_versions[0] and requirements == "release": - dav_servers += ("fastmail",) - - for dav_server in dav_servers: - job = { - 'python': python, - 'env': ("BUILD=test-storage " - f"DAV_SERVER={dav_server} " - f"REQUIREMENTS={requirements} ") - } - - if dav_server in ("davical", "icloud"): - job['if'] = 'NOT (type IN (pull_request))' - - matrix.append(job) - -matrix.append({ - 'python': python_versions[0], - 'env': ("BUILD=test " - "ETESYNC_TESTS=true " - "REQUIREMENTS=latest") -}) - -# matrix.append({ -# 'language': 'generic', -# 'os': 'osx', -# 'env': 'BUILD=test' -# }) - -with open('.travis.yml', 'w') as output: - json.dump(cfg, output, sort_keys=True, indent=2) diff --git a/scripts/tests.template b/scripts/tests.template new file mode 100644 index 0000000..26285e5 --- /dev/null +++ b/scripts/tests.template @@ -0,0 +1,22 @@ +# vim: ft=yaml + +image: archlinux +packages: + - docker + - docker-compose + - python-pip +sources: + - https://github.com/pimutils/vdirsyncer +environment: + BUILD: {BUILD} + REQUIREMENTS: {REQUIREMENTS} + DAV_SERVER: {DAV_SERVER} +tasks: + - setup: | + cd vdirsyncer + make -e install-$BUILD + - test: | + cd vdirsyncer + # Non-system python is used for packages: + export PATH=$PATH:~/.local/bin/ + make -e $BUILD diff --git a/scripts/travis-install.sh b/scripts/travis-install.sh deleted file mode 100644 index 9b78409..0000000 --- a/scripts/travis-install.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# The OS X VM doesn't have any Python support at all -# See https://github.com/travis-ci/travis-ci/issues/2312 -if [ "$TRAVIS_OS_NAME" = "osx" ]; then - brew update - brew install python3 - virtualenv -p python3 $HOME/osx-py3 - . $HOME/osx-py3/bin/activate -fi From 2161de30d0596143727244cfc9c862a343cdf3d2 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Mon, 5 Apr 2021 21:55:45 +0200 Subject: [PATCH 08/10] Avoid docker-compose The way it handles docker networks breaks builds. --- MANIFEST.in | 1 - docker-compose.yaml | 17 ----------------- docs/contributing.rst | 4 ++-- scripts/tests.template | 1 - tests/storage/servers/baikal/install.sh | 6 ++++-- tests/storage/servers/radicale/install.sh | 6 ++++-- tests/storage/servers/xandikos/install.sh | 6 ++++-- 7 files changed, 14 insertions(+), 27 deletions(-) delete mode 100644 docker-compose.yaml diff --git a/MANIFEST.in b/MANIFEST.in index 37426d3..9260ca0 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,5 @@ # setuptools-scm includes everything tracked by git prune docker -prune docker-compose prune scripts prune tests/storage/servers prune tests/storage/etesync diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index 17779bb..0000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,17 +0,0 @@ -version: '3' - -services: - xandikos: - build: docker/xandikos/ - ports: - - '8000:8000' - - radicale: - build: docker/radicale/ - ports: - - '8001:8001' - - baikal: - build: docker/baikal/ - ports: - - '8002:80' diff --git a/docs/contributing.rst b/docs/contributing.rst index 233ea71..92f7170 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -102,8 +102,8 @@ initialized and documented. For example, to test xandikos, first run the server itself:: - docker-compose build xandikos - docker-compose up -d xandikos + docker build -t xandikos docker/xandikos + docker start -p 8000:8000 xandikos Then run the tests specifying this ``DAV_SERVER``, run:: diff --git a/scripts/tests.template b/scripts/tests.template index 26285e5..71181be 100644 --- a/scripts/tests.template +++ b/scripts/tests.template @@ -3,7 +3,6 @@ image: archlinux packages: - docker - - docker-compose - python-pip sources: - https://github.com/pimutils/vdirsyncer diff --git a/tests/storage/servers/baikal/install.sh b/tests/storage/servers/baikal/install.sh index 99fcef9..023fef4 100644 --- a/tests/storage/servers/baikal/install.sh +++ b/tests/storage/servers/baikal/install.sh @@ -1,4 +1,6 @@ #!/bin/sh -docker-compose build baikal -docker-compose up -d baikal +cd $(git rev-parse --show-toplevel) + +docker build -t baikal docker/baikal +docker run -d -p 8002:80 baikal diff --git a/tests/storage/servers/radicale/install.sh b/tests/storage/servers/radicale/install.sh index 51732d8..690c9f3 100644 --- a/tests/storage/servers/radicale/install.sh +++ b/tests/storage/servers/radicale/install.sh @@ -1,4 +1,6 @@ #!/bin/sh -docker-compose build radicale -docker-compose up -d radicale +cd $(git rev-parse --show-toplevel) + +docker build -t radicale docker/radicale +docker run -d -p 8001:8001 radicale diff --git a/tests/storage/servers/xandikos/install.sh b/tests/storage/servers/xandikos/install.sh index b01f6ea..ff322b9 100644 --- a/tests/storage/servers/xandikos/install.sh +++ b/tests/storage/servers/xandikos/install.sh @@ -1,4 +1,6 @@ #!/bin/sh -docker-compose build xandikos -docker-compose up -d xandikos +cd $(git rev-parse --show-toplevel) + +docker build -t xandikos docker/xandikos +docker run -d -p 8000:8000 xandikos From 55af4eaf80de534d96b9ee7e54ca2e67dd63aab2 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Tue, 6 Apr 2021 09:32:18 +0200 Subject: [PATCH 09/10] Send coverage reports to Codecov --- .builds/tests-minimal.yaml | 1 + .builds/tests-release.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.builds/tests-minimal.yaml b/.builds/tests-minimal.yaml index 52d2abf..2fa6b1c 100644 --- a/.builds/tests-minimal.yaml +++ b/.builds/tests-minimal.yaml @@ -9,6 +9,7 @@ sources: environment: BUILD: test CI: true + CODECOV_TOKEN: b834a3c5-28fa-4808-9bdb-182210069c79 REQUIREMENTS: minimal # TODO: ETESYNC_TESTS tasks: diff --git a/.builds/tests-release.yaml b/.builds/tests-release.yaml index 0761054..0a75f27 100644 --- a/.builds/tests-release.yaml +++ b/.builds/tests-release.yaml @@ -8,6 +8,7 @@ sources: environment: BUILD: test CI: true + CODECOV_TOKEN: b834a3c5-28fa-4808-9bdb-182210069c79 REQUIREMENTS: release # TODO: ETESYNC_TESTS tasks: From 1f066ca6ca4634a7478cb5b104b508244e1a1a7a Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Tue, 6 Apr 2021 18:39:34 +0200 Subject: [PATCH 10/10] Remove unused Makefile target --- Makefile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Makefile b/Makefile index f24510f..6f7b7a1 100644 --- a/Makefile +++ b/Makefile @@ -116,12 +116,4 @@ install-dev: pip install -U --force-reinstall $$(python setup.py --quiet minimal_requirements); \ fi -ssh-submodule-urls: - git submodule foreach "\ - echo -n 'Old: '; \ - git remote get-url origin; \ - git remote set-url origin \$$(git remote get-url origin | sed -e 's/https:\/\/github\.com\//git@github.com:/g'); \ - echo -n 'New URL: '; \ - git remote get-url origin" - .PHONY: docs