diff options
author | Vincent Breitmoser <look@my.amazin.horse> | 2019-01-07 00:37:29 +0100 |
---|---|---|
committer | Vincent Breitmoser <look@my.amazin.horse> | 2019-01-07 00:38:20 +0100 |
commit | c1a8e3b64dcae7c6337e8887ef9981c334b493fc (patch) | |
tree | 300226bae90b7d18d72007ef32c6877213f4f4f0 | |
parent | 664323131634a2b33e61732103ffd019fa2b2502 (diff) |
only use two jobs in circleci, flag integration and unit tests
-rw-r--r-- | .circleci/config.yml | 61 |
1 files changed, 19 insertions, 42 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 021f90b..51c49e1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2 jobs: - cargo_fetch: + test: docker: - image: puzzlewolf/rust-libical3:0.2 working_directory: /mnt/crate @@ -21,17 +21,6 @@ jobs: paths: - ~/.cargo/registry - ~/.cargo/git - test: - docker: - - image: puzzlewolf/rust-libical3:0.2 - working_directory: /mnt/crate - steps: - - checkout - - attach_workspace: - at: "." - - restore_cache: - keys: - - cargo-v2-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }} - run: name: Print version information command: rustc --version; cargo --version @@ -62,9 +51,23 @@ jobs: at: "." - run: mkdir target/coverage - run: - name: Rerun the tests collecting coverage + name: Run coverage for unit tests command: | - for file in ./target/debug/*; do + for file in ./target/debug/khaleesi-*; do + if test -x $file; then + echo "Running coverage for: $file" + kcov --verify --include-path $(pwd) --exclude-pattern=tests \ + target/coverage/$(basename $file) \ + $file --quiet + fi + done + - run: + name: Upload to Codecov + command: bash <(curl -s https://codecov.io/bash) -c -F unittests + - run: + name: Run coverage for integration tests + command: | + for file in ./target/debug/integration-*; do if test -x $file; then echo "Running coverage for: $file" kcov --verify --include-path $(pwd) --exclude-pattern=tests \ @@ -72,41 +75,15 @@ jobs: $file --quiet fi done - kcov --merge target/coverage-merged target/coverage/* - - store_artifacts: - path: target/coverage - destination: coverage - - store_artifacts: - path: target/coverage-merged - destination: coverage-merged - - persist_to_workspace: - root: "." - paths: - - target/coverage - codecov_upload: - docker: - - image: buildpack-deps:curl - working_directory: /mnt/crate - steps: - - checkout - - attach_workspace: - at: "." - run: name: Upload to Codecov - command: bash <(curl -s https://codecov.io/bash) + command: bash <(curl -s https://codecov.io/bash) -c -F integration workflows: version: 2 test_all_and_coverage: jobs: - - cargo_fetch - - test: - requires: - - cargo_fetch - # TODO fix kcov SIGILL, see https://circleci.com/gh/Valodim/khaleesi/30 + - test - coverage: requires: - test - - codecov_upload: - requires: - - coverage |