mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Merge pull request #909 from pimutils/fastmail
Run Fastmail on CI again
This commit is contained in:
commit
8dab258ef0
2 changed files with 27 additions and 6 deletions
|
|
@ -10,6 +10,7 @@ sources:
|
||||||
- https://github.com/pimutils/vdirsyncer
|
- https://github.com/pimutils/vdirsyncer
|
||||||
secrets:
|
secrets:
|
||||||
- a36c8ba3-fba0-4338-b402-6aea0fbe771e
|
- a36c8ba3-fba0-4338-b402-6aea0fbe771e
|
||||||
|
- 4d9a6dfe-5c8d-48bd-b864-a2f5d772c536
|
||||||
environment:
|
environment:
|
||||||
BUILD: test
|
BUILD: test
|
||||||
CI: true
|
CI: true
|
||||||
|
|
@ -33,6 +34,19 @@ tasks:
|
||||||
# Non-system python is used for packages:
|
# Non-system python is used for packages:
|
||||||
export PATH=$PATH:~/.local/bin/
|
export PATH=$PATH:~/.local/bin/
|
||||||
make -e style
|
make -e style
|
||||||
|
- check-secrets: |
|
||||||
|
# Stop here if this is a PR. PRs can't run with the below secrets.
|
||||||
|
[ -f ~/fastmail-secrets ] || complete-build
|
||||||
|
- extra-storages: |
|
||||||
|
set +x
|
||||||
|
source ~/fastmail-secrets
|
||||||
|
set -x
|
||||||
|
|
||||||
|
cd vdirsyncer
|
||||||
|
export PATH=$PATH:~/.local/bin/
|
||||||
|
DAV_SERVER=fastmail pytest tests/storage
|
||||||
|
- check-tag: |
|
||||||
|
# Stop here unless this is a tag.
|
||||||
git describe --exact-match --tags || complete-build
|
git describe --exact-match --tags || complete-build
|
||||||
- publish: |
|
- publish: |
|
||||||
cd vdirsyncer
|
cd vdirsyncer
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,18 @@ import pytest
|
||||||
|
|
||||||
class ServerMixin:
|
class ServerMixin:
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def get_storage_args(self, item_type, slow_create_collection):
|
def get_storage_args(self, slow_create_collection, aio_connector, request):
|
||||||
if item_type == "VTODO":
|
if "item_type" in request.fixturenames:
|
||||||
# Fastmail has non-standard support for TODOs
|
if request.getfixturevalue("item_type") == "VTODO":
|
||||||
# See https://github.com/pimutils/vdirsyncer/issues/824
|
# Fastmail has non-standard support for TODOs
|
||||||
pytest.skip("Fastmail has non-standard VTODO support.")
|
# See https://github.com/pimutils/vdirsyncer/issues/824
|
||||||
|
pytest.skip("Fastmail has non-standard VTODO support.")
|
||||||
|
|
||||||
async def inner(collection="test"):
|
async def inner(collection="test"):
|
||||||
args = {
|
args = {
|
||||||
"username": os.environ["FASTMAIL_USERNAME"],
|
"username": os.environ["FASTMAIL_USERNAME"],
|
||||||
"password": os.environ["FASTMAIL_PASSWORD"],
|
"password": os.environ["FASTMAIL_PASSWORD"],
|
||||||
|
"connector": aio_connector,
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.storage_class.fileext == ".ics":
|
if self.storage_class.fileext == ".ics":
|
||||||
|
|
@ -25,7 +27,12 @@ class ServerMixin:
|
||||||
raise RuntimeError()
|
raise RuntimeError()
|
||||||
|
|
||||||
if collection is not None:
|
if collection is not None:
|
||||||
args = slow_create_collection(self.storage_class, args, collection)
|
args = await slow_create_collection(
|
||||||
|
self.storage_class,
|
||||||
|
args,
|
||||||
|
collection,
|
||||||
|
)
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
return inner
|
return inner
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue