Local devnet: fix block less than 10 #1877
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: rustup show | |
- run: rustup component add rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo fmt --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "true" | |
- run: rustup show | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
- name: "Install cairo-lang" | |
run: | | |
# We need to pin the version of sympy, 1.13.0 is incompatible with cairo-lang | |
pip install cairo-lang==0.13.2 "sympy<1.13.0" | |
- name: "Prepare test environment" | |
run: | | |
mkdir -p build | |
cairo-compile cairo-lang/src/starkware/starknet/core/os/os.cairo --output build/os_latest.json --cairo_path cairo-lang/src | |
- run: cargo clippy --all --all-targets -- -D warnings | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "true" | |
- run: rustup show | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
- name: "Install cairo-lang" | |
run: | | |
# We need to pin the version of sympy, 1.13.0 is incompatible with cairo-lang | |
pip install cairo-lang==0.13.2 "sympy<1.13.0" | |
- name: "Prepare test environment" | |
run: | | |
bash ./setup-scripts/reset-tests.sh | |
- name: "Run tests" | |
run: | | |
RUSTFLAGS="-D warnings" cargo test | |
udeps: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "true" | |
- run: rustup show | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
- name: "Install cairo-lang" | |
run: | | |
# We need to pin the version of sympy, 1.13.0 is incompatible with cairo-lang | |
pip install cairo-lang==0.13.2 "sympy<1.13.0" | |
- name: "Prepare test environment" | |
run: | | |
mkdir -p build | |
cairo-compile cairo-lang/src/starkware/starknet/core/os/os.cairo --output build/os_latest.json --cairo_path cairo-lang/src | |
- run: cargo install cargo-udeps --locked | |
- run: cargo udeps --all-targets | |
orphans: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: rustup show | |
- run: rustup component add rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- run: git submodule update --init | |
- run: ./scripts/check-orphans.sh | |