Skip to content

Commit

Permalink
Add cargo-deny to CI by adding to make test (googleforgames#340)
Browse files Browse the repository at this point in the history
This adds `cargo-deny` to `make test`, which also makes sure it is run
in Cloud Build for continuous integration.

This found a couple of dependencies that need to be updated because of
security advisories. These will be updated in a separate PR.

Closes googleforgames#327
  • Loading branch information
markmandel authored Jul 20, 2021
1 parent afc2a86 commit 36be5eb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ version:

# Run all tests
test: ensure-build-image
docker run --rm $(common_rust_args) \
--entrypoint=cargo $(BUILD_IMAGE_TAG) deny check
docker run --rm $(common_rust_args) \
--entrypoint=cargo $(BUILD_IMAGE_TAG) clippy --tests -- -D warnings
docker run --rm $(common_rust_args) \
Expand Down
4 changes: 4 additions & 0 deletions build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ To run our external documentation tests:

`cargo +nightly test --doc`

To test dependency licences and security advisories:

`cargo deny check`

### Developing with Make + Docker

There are a few reasons you may want to use the [Make](https://www.gnu.org/software/make/)
Expand Down
1 change: 1 addition & 0 deletions build/build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ RUN set -eux && \
rustup toolchain install nightly && \
cargo install cross && \
cargo install cargo-about && \
cargo install --locked cargo-deny && \
rustup --version && \
cargo --version && \
rustc --version && \
Expand Down

0 comments on commit 36be5eb

Please sign in to comment.