From 99cbe28a8e01d33d0520858d957c400c825e8c0b Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 6 Nov 2022 20:06:25 +0100 Subject: ci: add & improve jobs --- .circleci/config.yml | 78 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 72 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 128a09e..3a5adda 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,17 +1,43 @@ version: 2.1 jobs: - test-all: + test-nightly: docker: - image: cimg/rust:1.63.0 steps: - checkout - run: cargo --version - - run: rustup install nightly - - run: rustup default nightly - run: - name: Run Tests + name: Install Rust nightly + command: rustup install nightly + - run: + name: Setting Rust nightly as default + command: rustup default nightly + - run: + name: Run tests with all features enabled + command: cargo test --workspace --all-features + - run: + name: Run tests with only default features enabled + command: cargo test --workspace + + test-stable: + docker: + - image: cimg/rust:1.63.0 + steps: + - checkout + - run: cargo --version + - run: + name: Install Rust stable + command: rustup install stable + - run: + name: Setting Rust stable as default + command: rustup default stable + - run: + name: Run tests with all features enabled command: cargo test --workspace --all-features + - run: + name: Run tests with only default features enabled + command: cargo test --workspace coverage: machine: true @@ -31,12 +57,52 @@ jobs: --all-features \ --ciserver circle-ci \ --out Xml - # --coveralls $COVERALLS_REPO_TOKEN bash <(curl -s https://codecov.io/bash) + lints: + docker: + - image: cimg/rust:1.63.0 + steps: + - checkout + - run: cargo --version + - run: + name: Install Rust nightly + command: rustup install nightly + - run: + name: Setting Rust nightly as default + command: rustup default nightly + - run: + name: Run Clippy + command: cargo clippy + + code-style: + docker: + - image: cimg/rust:1.63.0 + steps: + - checkout + - run: cargo --version + - run: + name: Install Rust nightly + command: rustup install nightly + - run: + name: Setting Rust nightly as default + command: rustup default nightly + - run: + name: Install Rustfmt + command: rustup component add rustfmt --toolchain nightly + - run: + name: Run Rustfmt + command: find src macros/src -type f -name "*.rs" -exec rustfmt --edition 2021 --check {} \; + workflows: test: jobs: - - test-all + - test-nightly + - test-stable - coverage + checks: + jobs: + - lints + - code-style + -- cgit v1.2.3-18-g5258