Skip to content

OutsideExecution (SNIP-9) #2000

OutsideExecution (SNIP-9)

OutsideExecution (SNIP-9) #2000

Workflow file for this run

name: Lint and test
on:
pull_request:
push:
branches:
- main
jobs:
lint_and_test:
name: Lint and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract scarb version
run: |
SCARB_VERSION=$(grep 'scarb-version = ' Scarb.toml | sed 's/scarb-version = "\(.*\)"/\1/')
echo "SCARB_VERSION=$SCARB_VERSION" >> "$GITHUB_ENV"
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: ${{ env.SCARB_VERSION }}
- name: Extract foundry version
run: |
FOUNDRY_VERSION=$(grep 'snforge_std = ' Scarb.toml | sed 's/snforge_std = "\(.*\)"/\1/')
echo "FOUNDRY_VERSION=$FOUNDRY_VERSION" >> "$GITHUB_ENV"
- uses: foundry-rs/setup-snfoundry@v3
with:
starknet-foundry-version: ${{ env.FOUNDRY_VERSION }}
- name: Markdown lint
uses: DavidAnson/markdownlint-cli2-action@db43aef879112c3119a410d69f66701e0d530809 # v16
with:
globs: |
*.md
!PULL_REQUEST_TEMPLATE.md
- name: Cairo lint
run: scarb fmt --check --workspace
- name: Cairo test
run: snforge test --workspace