Commit graph

395 commits

Author SHA1 Message Date
Seo Sanghyeon
d01eb40de0 Fix uid_fetch doc 2019-02-22 01:48:50 +09:00
Jon Gjengset
ead7d2173b
rustfmt beta 2018-12-10 10:14:09 -05:00
Jon Gjengset
70ca4f7ef8
Note the use of Greenmail 1.5.9 2018-12-07 16:37:48 -05:00
Jon Gjengset
67ee2f5175
Bump version for imap-proto fixes
- A `NIL` hierarchy delimiter in a `Name` is now properly parsed and exposed as `None`
 - `RFC822.TEXT` responses are now returned by `Fetch::text()`.
2018-12-07 16:34:57 -05:00
Jon Gjengset
21cb6f83fa
Restore test that passes in 1.5.9 2018-12-04 10:39:00 -05:00
Jon Gjengset
ec52a64017
Use up-to-date tarpaulin and only clean imap 2018-11-28 16:44:22 -05:00
Jon Gjengset
6d158e7eb5
GreenMail 1.5.9 allows empty SEARCH 2018-11-28 09:51:45 -05:00
Jon Gjengset
1b086d40de
Prep for 2018 edition [skip ci] 2018-11-28 09:44:01 -05:00
Jon Gjengset
b20488af56
Merge pull request #104 from jonhoo/no-extra-ci-caching
Avoid separate cache for integration tests
2018-11-25 16:14:13 -05:00
Jon Gjengset
5309102a1a
Avoid separate cache for integration tests
Travis uses [several factors](https://docs.travis-ci.com/user/caching/#caches-and-build-matrices)
to determine whether a given job shares a cache with a different job. In
particular, it uses any environment variables specified in
`.travis.yml`. Previously, integration tests set `INTEGRATION=true`,
which meant that the integration tests did not share a cache with the
non-integration tests, even though the compilation is exactly the same.

This patch fixes that by remvoing the `INTEGRATION` environment variable
and instead using the globally available
[`$TRAVIS_BUILD_STAGE_NAME`](https://docs.travis-ci.com/user/environment-variables/#default-environment-variables)
to run the setup required for integration tests only in stages that run
integration tests (namely integration and coverage). Now, the test and
integration stages share all the parameters that Travis uses to
determine cache identifiers, and so they'll share their cache!

Coverage still uses its own cache because it specifically needs to *not*
cache the compiled crate, but *does* need to cache `cargo-tarpaulin`.
2018-11-25 15:31:29 -05:00
Jon Gjengset
b9db23b6cb
Correct bash syntax [skip ci] 2018-11-25 15:30:13 -05:00
Jon Gjengset
3a68d5c5f9
Avoid double builds for tags
This is pretty sad, as I'd like for build status to also be visible for
release tags, but
https://github.com/travis-ci/travis-ci/issues/2456#issuecomment-441393704
and
https://github.com/travis-ci/travis-ci/issues/2200#issuecomment-441395545
make that unreasonable. So for the time being we'll settle with just
doing CI for PRs and pushes to master.
2018-11-24 16:06:39 -05:00
Jon Gjengset
30079d8b9b
Release 0.9.5 2018-11-24 15:22:53 -05:00
Jon Gjengset
7675efb230
Also test tagged releases 2018-11-24 15:22:53 -05:00
Jon Gjengset
86d4da84d7
Note that we support older stable versions
[skip ci]
2018-11-24 15:16:29 -05:00
Jon Gjengset
cb83d0d26c
Merge pull request #103 from jonhoo/tuned-ci
Refine Travis CI build and add rustfmt/clippy
2018-11-24 15:12:51 -05:00
Jon Gjengset
1e9ac02b69
Don't run CI on push except on master
This avoids double-testing PRs that are made from branches on
jonhoo/rust-imap.
2018-11-24 14:32:53 -05:00
Jon Gjengset
2d28884da7
Also test minimum supported Rust version
See https://travis-ci.org/jonhoo/rust-imap/builds/459198148.

Since b6e9ea080b, the `crate` issue is
fixed, so >=1.26.2 will work.
2018-11-24 14:18:39 -05:00
Jon Gjengset
f25b9995eb
Let's see what Rust version we support 2018-11-24 14:17:30 -05:00
Jon Gjengset
a2b0773622
Remove AppVeyor now that Travis does Windows
[skip ci]
2018-11-24 14:17:30 -05:00
Jon Gjengset
cdbc330d77
Just test stable on non-linux
Let's not waste Travis' cycles unnecessarily
2018-11-24 14:17:30 -05:00
Jon Gjengset
64b968cd16
Don't worry that tarpaulin is already installed 2018-11-24 14:17:29 -05:00
Jon Gjengset
d5076883c5
Only require sudo for integration tests 2018-11-24 14:17:29 -05:00
Jon Gjengset
481ace22a6
Also test on Windows! 2018-11-24 14:17:29 -05:00
Jon Gjengset
1eab9c8375
Refine Travis CI build and add rustfmt/clippy
This patch modifies the Travis build pipeline to include multiple
[build stages](https://docs.travis-ci.com/user/build-stages/). CI now
progresses in the following steps:

 - First, `cargo check` is run on `stable` only.
   If it fails, the build is considered failed.
   This is so that we can fail fast for obviously botched commits.
 - Then, unit and doc tests are run for all targets.
   If any non-nightly tests fail, the build fails.
 - Then, integration tests with
   [GreenMail](http://www.icegreen.com/greenmail/) are run on Linux for
   all Rust targets. We can't run them on macOS because it doesn't
   support the Docker service.
   If any non-nightly tests fail, the build fails.
 - Then, `rustfmt` and `clippy` are both run on *beta* and on nightly.
   We use beta instead of stable to try to give ourselves some headroom
   for changes coming down the pike. The lints are only run on Linux,
   because the platform shouldn't matter.
   If any beta lints fail, the build fails.
 - And finally, we generate a coverage report on nightly on Linux.
   This can only run on nightly because tarpaulin requires nightly.
   It's only run on Linux, because we want to include integration tests.
   Note that the coverage stage has its own cache
   (`CACHE_NAME=coverage`) because the only thing it caches is cargo
   tarpaulin (the rust/cargo cache is cleaned before exit).

Fixes #48.
2018-11-24 14:17:29 -05:00
Jon Gjengset
b6e9ea080b
Make crate compile on Rust 1.26.2+ 2018-11-24 14:17:15 -05:00
Jon Gjengset
a610283861
Fix nightly clippy warning 2018-11-24 12:45:07 -05:00
Jon Gjengset
cb9df750fd
Restart test server in case tests aren't reentrant
Specifically, if a test doesn't clean up nicely after itself, running it
a second time for checking coverage might make it fail! We restart the
docker server so that all the server state is erased, which should
mitigate that.
2018-11-24 00:57:07 -05:00
Jon Gjengset
e7e20c08e9
Merge branch 'integration-testing' 2018-11-23 13:55:57 -05:00
Jon Gjengset
6aa7c30167
Quick'n'dirty fix for missing lettre release 2018-11-23 13:55:36 -05:00
Jon Gjengset
c7a6a72ed7
Add is-it-maintained badges
[skip ci]
2018-11-22 22:02:21 -05:00
Jon Gjengset
26d8e8e333
Actually, now it's codecov.io 2018-11-22 20:57:18 -05:00
Jon Gjengset
328144b3f5
Add testing instructions to README 2018-11-22 20:56:42 -05:00
Jon Gjengset
74fc745618
Fix typo 2018-11-22 20:56:42 -05:00
Jon Gjengset
b75e30802a
No need to test --lib twice 2018-11-22 20:56:42 -05:00
Jon Gjengset
9be18cc574
No need to even install coverage on osx 2018-11-22 20:56:42 -05:00
Jon Gjengset
13a5638149
We're using coveralls.io 🤦 2018-11-22 20:56:41 -05:00
Jon Gjengset
9353493139
Make sure tests get run by coverage 2018-11-22 20:56:41 -05:00
Jon Gjengset
3e034585b3
Run Greenmail detched 2018-11-22 20:56:41 -05:00
Jon Gjengset
e52290e8dd
list test isn't done yet 2018-11-22 20:56:41 -05:00
Jon Gjengset
f4e1dc81b5
Only check coverage on stable 2018-11-22 20:56:41 -05:00
Jon Gjengset
b85e4cbe9a
No docker on osx 2018-11-22 20:56:41 -05:00
Jon Gjengset
4d9cd8c49a
Better code coverage maybe? 2018-11-22 20:56:41 -05:00
Jon Gjengset
06106fbc58
Don't run integration tests on appveyor
It is
[possible](https://stefanscherer.github.io/setup-windows-docker-ci-appveyor/)
but I don't want to dig into it atm.
2018-11-22 20:56:41 -05:00
Jon Gjengset
c393fd7162
Add Travis integration testing
This uses [GreenMail's Docker
image](http://www.icegreen.com/greenmail/#deploy_docker_standalone) to
spin up a real SMTP+IMAP server on Travis, and then runs a series of
integration tests against it by sending e-mails using
[`lettre`](https://crates.io/crates/lettre) and checking that we can
receive them correctly.

A start on #101.
2018-11-22 20:56:41 -05:00
Jon Gjengset
8299a6be9d
Bump version for repository move 2018-11-22 20:55:25 -05:00
Jon Gjengset
3fbf52ef54
Bump version for string changes and "" fix 2018-11-22 17:58:38 -05:00
Jon Gjengset
5dc51ac6b1
Show example of how to use store to delete 2018-11-22 17:57:56 -05:00
Jon Gjengset
357603b15f
Empty string != "" 2018-11-22 17:57:41 -05:00
Jon Gjengset
2b17bc0538
Make all public methods generic over str ref 2018-11-22 17:57:05 -05:00