Skip to content

feat: add cairo-lint ci #581

feat: add cairo-lint ci

feat: add cairo-lint ci #581

Workflow file for this run

name: check
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
permissions: read-all
jobs:
markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
sudo gem install mdl
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
run: |
scarb cairo-lint > lint_output.txt
if grep -i "warning:" lint_output.txt; then
echo "Linting failed due to warnings"
exit 1
fi
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- run: scarb test