Skip to content

Commit

Permalink
ci: check crates not in workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
chesedo committed Jul 22, 2022
1 parent 34b0bdb commit 7e88364
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- run: cargo fmt --all --check
- run: cargo install cargo-sort
- run: cargo sort --check --workspace
- run: cargo check --workspace
- run: cargo check --workspace --all-targets
- save_cache:
key: cargo-{{ checksum "Cargo.lock" }}
paths:
Expand All @@ -41,6 +41,36 @@ jobs:
--D warnings \
-A clippy::let-unit-value \
-A clippy::format-push-string
check-standalone:
parameters:
path:
description: "Path to crate excluded from workspace"
type: string
docker:
- image: cimg/rust:1.62.0
steps:
- checkout
- restore_cache:
keys:
- cargo-{{ checksum "Cargo.lock" }}
- run:
name: Patch service
command: |
cat\<< EOF > ~/.cargo/config.toml
[patch.crates-io]
shuttle-service = { path = "$PWD/service" }
EOF
- run: cargo fmt --all --check --manifest-path << parameters.path >>/Cargo.toml
- run: cargo install cargo-sort
- run: cargo sort --check << parameters.path >>
- run: |
cargo clippy --tests \
--all-targets \
--manifest-path << parameters.path >>/Cargo.toml \
--no-deps -- \
--D warnings \
-A clippy::let-unit-value \
-A clippy::format-push-string
build-test-and-push:
resource_class: xlarge
Expand Down Expand Up @@ -118,6 +148,21 @@ workflows:
matrix:
parameters:
framework: ["web-axum", "web-rocket", "web-tide", "web-tower"]
- check-standalone:
requires:
- clippy-workspace
matrix:
parameters:
framework:
- examples/axum/hello-world
- examples/axum/websocket
- examples/rocket/authentication
- examples/rocket/hello-world
- examples/rocket/postgres
- examples/rocket/url-shortener
- examples/tide/hello-world
- examples/tide/postgres
- examples/tower/hello-world
# build-test-and-push:
# jobs:
# - build-test-and-push

0 comments on commit 7e88364

Please sign in to comment.