Ipfs functionality (#15) #63
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: 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 |