From c6b246c79e2f91e6fff930bc1ee4acfd0e178846 Mon Sep 17 00:00:00 2001 From: Sebastian Miasojed Date: Wed, 14 Feb 2024 10:56:49 +0100 Subject: [PATCH] Add contract build with lint option to CI (#1496) --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4072ce08d..fdf2d01cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -195,9 +195,12 @@ jobs: - name: Check Template run: >- + # The linter requires two crates + cargo install cargo-dylint dylint-link cargo -vV && cargo run --profile debug-ci -- contract --version && cargo run --profile debug-ci -- contract new --target-dir ${{ runner.temp }} foobar && - cargo run --profile debug-ci -- contract build --manifest-path=${{ runner.temp }}/foobar/Cargo.toml && + # Build with linting + cargo run --profile debug-ci -- contract build --lint --manifest-path=${{ runner.temp }}/foobar/Cargo.toml && cargo run --profile debug-ci -- contract check --manifest-path=${{ runner.temp }}/foobar/Cargo.toml && cargo run --profile debug-ci -- contract build --manifest-path=${{ runner.temp }}/foobar/Cargo.toml --release