diff options
author | HampusM <hampus@hampusmat.com> | 2022-11-06 20:06:25 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-11-06 20:06:25 +0100 |
commit | 99cbe28a8e01d33d0520858d957c400c825e8c0b (patch) | |
tree | 223fb721da17f4a3cc9e5dcb45074ca90a1bd4f6 /.circleci | |
parent | 6e764480ee150146afa9d629777433f8239fa1ba (diff) |
ci: add & improve jobs
Diffstat (limited to '.circleci')
-rw-r--r-- | .circleci/config.yml | 78 |
1 files 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 + |