azure-pipelines.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. stages:
  2. - stage: check
  3. displayName: Compilation check
  4. dependsOn: []
  5. jobs:
  6. - template: azure/cargo-check.yml@templates
  7. parameters:
  8. name: cargo_check
  9. # This represents the minimum Rust version supported.
  10. # Tests are not run as tests may require newer versions of rust.
  11. - stage: msrv
  12. displayName: "Minimum supported Rust version: 1.36.0"
  13. dependsOn: []
  14. jobs:
  15. - template: azure/cargo-check.yml@templates
  16. parameters:
  17. rust: 1.36.0
  18. - stage: test
  19. displayName: Test suite
  20. dependsOn: check
  21. jobs:
  22. - job: test
  23. displayName: cargo test --{examples,doc,lib} (cross-platform)
  24. strategy:
  25. matrix:
  26. Linux:
  27. vmImage: ubuntu-16.04
  28. MacOS:
  29. vmImage: macOS-10.14
  30. Windows:
  31. vmImage: windows-2019
  32. pool:
  33. vmImage: $(vmImage)
  34. steps:
  35. - template: azure/install-rust.yml@templates
  36. parameters:
  37. rust: stable
  38. - script: cargo test --examples
  39. displayName: Test examples
  40. - script: cargo test --doc
  41. displayName: Run doctests
  42. - script: cargo test --lib
  43. displayName: Run unit tests
  44. - job: integration
  45. displayName: cargo test
  46. pool:
  47. vmImage: ubuntu-16.04
  48. services:
  49. greenmail: greenmail
  50. steps:
  51. - template: azure/install-rust.yml@templates
  52. parameters:
  53. rust: stable
  54. - script: cargo test
  55. displayName: Run tests
  56. - template: azure/install-rust.yml@templates
  57. parameters:
  58. rust: beta
  59. - script: cargo test
  60. displayName: Run tests on beta
  61. - template: azure/install-rust.yml@templates
  62. parameters:
  63. rust: nightly
  64. - script: cargo test
  65. displayName: Run tests on nightly
  66. continueOnError: true
  67. - stage: style
  68. displayName: Style linting
  69. dependsOn: check
  70. jobs:
  71. - template: azure/style.yml@templates
  72. # https://github.com/greenmail-mail-test/greenmail/issues/284
  73. # - stage: coverage
  74. # displayName: Code coverage
  75. # dependsOn: test
  76. # jobs:
  77. # - template: azure/coverage.yml@templates
  78. # parameters:
  79. # codecov_token: $(CODECOV_TOKEN_SECRET)
  80. # services:
  81. # greenmail: greenmail
  82. # envs:
  83. # TEST_HOST: greenmail
  84. resources:
  85. repositories:
  86. - repository: templates
  87. type: github
  88. name: crate-ci/azure-pipelines
  89. endpoint: jonhoo
  90. containers:
  91. - container: greenmail
  92. image: greenmail/standalone:1.5.10
  93. ports:
  94. - 3025:3025
  95. - 3110:3110
  96. - 3143:3143
  97. - 3465:3465
  98. - 3993:3993
  99. - 3995:3995
  100. env:
  101. GREENMAIL_OPTS: "-Dgreenmail.setup.test.all -Dgreenmail.hostname=0.0.0.0 -Dgreenmail.auth.disabled -Dgreenmail.verbose"