diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 1c54c2b1..c6ccfaef 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -18,6 +18,26 @@ jobs: mdl -s .github/linter/readme_style.rb README.md mdl -s .github/linter/base_style.rb .github + cairo-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Rust nightly + uses: dtolnay/rust-toolchain@nightly + with: + components: rustfmt, clippy + - name: Install cairo-lint + run: cargo install scarb-cairo-lint --git https://github.com/keep-starknet-strange/cairo-lint + + - uses: asdf-vm/actions/install@v3 + - name: Run cairo-lint and check for warnings + run: | + scarb cairo-lint > lint_output.txt 2>&1 + if grep -qi "warning:" lint_output.txt; then + echo "Linting failed due to warnings" + exit 1 + fi + test: runs-on: ubuntu-latest steps: