File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1
1
image : alpine/latest
2
2
packages :
3
3
- go
4
+ # for imaptest
5
+ - curl
6
+ - gcc
7
+ - netcat-openbsd
4
8
sources :
5
9
- https://github.com/emersion/go-imap#v2
6
10
tasks :
@@ -10,3 +14,25 @@ tasks:
10
14
- test : |
11
15
cd go-imap
12
16
go test -race ./...
17
+ - imaptest : |
18
+ curl https://dovecot.org/nightly/dovecot-latest.tar.gz | tar -xz
19
+ mv dovecot-0.0.0-* dovecot
20
+ cd dovecot
21
+ ./configure
22
+ make -j$(nproc)
23
+ cd -
24
+ curl https://dovecot.org/nightly/imaptest/imaptest-latest.tar.gz | tar -xz
25
+ mv dovecot-0.0-imaptest-0.0.0-* imaptest
26
+ cd imaptest
27
+ ./configure --with-dovecot=../dovecot
28
+ make -j$(nproc)
29
+ curl -O https://dovecot.org/tmp/dovecot-crlf
30
+ (cd ../go-imap && go run -race ./cmd/imapmemserver -listen localhost:1143 -insecure-auth) &
31
+ for _ in $(seq 1 20); do
32
+ if nc -z localhost 1143; then
33
+ break
34
+ fi
35
+ sleep 1
36
+ done
37
+ src/imaptest user=user pass=user port=1143 mbox=dovecot-crlf test=src/tests || true
38
+ pkill imapmemserver
You can’t perform that action at this time.
0 commit comments