Files
smartcore/.circleci/config.yml
Luis Moreno eb769493e7 Add coverage check (#57)
* Add coverage check
2021-01-05 16:13:39 -04:00

60 lines
1.5 KiB
YAML

version: 2.1
workflows:
version: 2.1
build:
jobs:
- build
- clippy
- coverage
jobs:
build:
docker:
- image: circleci/rust:latest
environment:
TZ: "/usr/share/zoneinfo/your/location"
steps:
- checkout
- restore_cache:
key: project-cache
- run:
name: Check formatting
command: cargo fmt -- --check
- run:
name: Stable Build
command: cargo build --features "nalgebra-bindings ndarray-bindings"
- run:
name: Test
command: cargo test --features "nalgebra-bindings ndarray-bindings"
- save_cache:
key: project-cache
paths:
- "~/.cargo"
- "./target"
clippy:
docker:
- image: circleci/rust:latest
steps:
- checkout
- run:
name: Install cargo clippy
command: rustup component add clippy
- run:
name: Run cargo clippy
command: cargo clippy --all-features -- -Drust-2018-idioms -Dwarnings
coverage:
machine: true
steps:
- checkout
- run:
name: Generate report
command: >
docker run --security-opt seccomp=unconfined -v $PWD:/volume
xd009642/tarpaulin:latest-nightly cargo tarpaulin -v --ciserver circle-ci
--out Lcov --all-features -- --test-threads 1
- run:
name: Upload
command: bash <(curl -s https://codecov.io/bash) -Z -f