Skip to content

Feat/dockerized application for local testing #49

Feat/dockerized application for local testing

Feat/dockerized application for local testing #49

Workflow file for this run

name: Rust
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
DATABASE_URL: ${{ secrets.DATABASE_URL }}
jobs:
build-fmt-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install risczero toolchain
run: |
curl -L https://risczero.com/install | bash
export PATH="$HOME/.risc0/bin:$PATH"
rzup install
rzup install cpp
echo "$HOME/.risc0/bin" >> $GITHUB_PATH
- name: Add DATABASE_URL environment variable
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: echo "DATABASE_URL is set"
- name: Build
run: cargo build --verbose
- name: Run tests
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: cargo test --verbose
- name: Run format check
run: cargo fmt --check
- name: Run Clippy
run: >
cargo clippy
-p common
-p ethereum
-p guest-types
-p mmr-utils
-p relayer
-p starknet-handler
--
-D warnings
-W clippy::single_match
-W clippy::single_match_else
-W clippy::needless_match
-W clippy::needless_late_init
-W clippy::redundant_pattern_matching
-W clippy::redundant_pattern
-W clippy::redundant_guards
-W clippy::collapsible_match
-W clippy::match_single_binding
-W clippy::match_same_arms
-W clippy::match_ref_pats
-W clippy::match_bool
-D clippy::needless_bool
-W clippy::unwrap_used
-W clippy::expect_used