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

Disable integration tests by default #150

Merged
merged 1 commit into from
Jul 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ workflows:
context: haskell-ci
binary-cache-uri: ${BINARY_CACHE_URI-"http://hw-binary-cache-us-west-2-a.s3-website-us-west-2.amazonaws.com/archive"}
cabal-build-extra: --write-ghc-environment-files=ghc8.4.4+
cabal-test-extra: --test-show-details=direct --test-options='+RTS -g1'
cabal-test-extra: --test-show-details=direct --flag it --test-options='+RTS -g1'

- haskell/build-with-binary-cache:
name: GHC 8.6.5
Expand All @@ -60,7 +60,7 @@ workflows:
context: haskell-ci
binary-cache-uri: ${BINARY_CACHE_URI-"http://hw-binary-cache-us-west-2-a.s3-website-us-west-2.amazonaws.com/archive"}
cabal-build-extra: --write-ghc-environment-files=ghc8.4.4+
cabal-test-extra: --test-show-details=direct --test-options='+RTS -g1'
cabal-test-extra: --test-show-details=direct --flag it --test-options='+RTS -g1'

- haskell/build-with-binary-cache:
name: GHC 8.8.3
Expand All @@ -71,7 +71,7 @@ workflows:
context: haskell-ci
binary-cache-uri: ${BINARY_CACHE_URI-"http://hw-binary-cache-us-west-2-a.s3-website-us-west-2.amazonaws.com/archive"}
cabal-build-extra: --write-ghc-environment-files=ghc8.4.4+
cabal-test-extra: --test-show-details=direct --test-options='+RTS -g1'
cabal-test-extra: --test-show-details=direct --flag it --test-options='+RTS -g1'

- haskell/build-with-binary-cache:
name: GHC 8.10.1
Expand All @@ -82,7 +82,7 @@ workflows:
context: haskell-ci
binary-cache-uri: ${BINARY_CACHE_URI-"http://hw-binary-cache-us-west-2-a.s3-website-us-west-2.amazonaws.com/archive"}
cabal-build-extra: --write-ghc-environment-files=ghc8.4.4+
cabal-test-extra: --test-show-details=direct --test-options='+RTS -g1'
cabal-test-extra: --test-show-details=direct --flag it --test-options='+RTS -g1'

- merge-point/merge-point:
name: Build Ok
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ With [Docker Compose](./docker-compose.yml) this variable is used to configure K
$ docker-compose up
```

After that, tests can be run as usual:
After that, integration tests can switched on with using 'it' flag:

```
$ cabal test --test-show-details=direct
$ cabal test --test-show-details=direct --flag it
```

## Credits
Expand Down
7 changes: 7 additions & 0 deletions hw-kafka-client.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ flag examples
manual: True
default: False

flag it
description: Run integration tests
manual: True
default: False

library
hs-source-dirs: src
ghc-options: -Wall
Expand Down Expand Up @@ -103,6 +108,8 @@ test-suite integration-tests
, text
, transformers
build-tool-depends: hspec-discover:hspec-discover
if !(flag(it))
buildable: False
other-modules: Kafka.IntegrationSpec
Kafka.TestEnv
default-language: Haskell2010
Expand Down
1 change: 1 addition & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ with import <nixpkgs> {};

pkgs.mkShell {
buildInputs = with pkgs; [
openssl
zlib
rdkafka
nettools
Expand Down