Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: run imaptest #499

Draft
wants to merge 1 commit into
base: v2
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions .build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
image: alpine/latest
packages:
- go
# for imaptest
- curl
- gcc
- netcat-openbsd
sources:
- https://github.com/emersion/go-imap#v2
tasks:
Expand All @@ -10,3 +14,25 @@ tasks:
- test: |
cd go-imap
go test -race ./...
- imaptest: |
curl https://dovecot.org/nightly/dovecot-latest.tar.gz | tar -xz
mv dovecot-0.0.0-* dovecot
cd dovecot
./configure
make -j$(nproc)
cd -
curl https://dovecot.org/nightly/imaptest/imaptest-latest.tar.gz | tar -xz
mv dovecot-0.0-imaptest-0.0.0-* imaptest
cd imaptest
./configure --with-dovecot=../dovecot
make -j$(nproc)
curl -O https://dovecot.org/tmp/dovecot-crlf
(cd ../go-imap && go run -race ./cmd/imapmemserver -listen localhost:1143 -insecure-auth) &
for _ in $(seq 1 20); do
if nc -z localhost 1143; then
break
fi
sleep 1
done
src/imaptest user=user pass=user port=1143 mbox=dovecot-crlf test=src/tests || true
pkill imapmemserver