Skip to content

fmt

fmt #63

Workflow file for this run

name: ci
on: push
env:
CARGO_TERM_COLOR: always
SCARB_VERSION: 2.7.0
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Format
working-directory: ./server
run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clippy
working-directory: ./server
run: cargo clippy --fix
- name: Check for diff
working-directory: ./server
run: git diff --exit-code
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
working-directory: ./server
run: cargo build --verbose
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Run tests
working-directory: ./server
run: cargo test --workspace --verbose
check-cairo:
runs-on: ubuntu-latest
name: Check cartridge-vrf format
steps:
- uses: actions/checkout@v4
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: ${{ env.SCARB_VERSION }}
- name: Format
run: scarb fmt --check
build-cairo:
needs: check-cairo
runs-on: ubuntu-latest
name: Build cartridge-vrf
steps:
- uses: actions/checkout@v4
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: ${{ env.SCARB_VERSION }}
- name: Build
run: scarb build
test-cairo:
needs: [check-cairo, build-cairo]
runs-on: ubuntu-latest
name: Test cartridge-vrf
steps:
- uses: actions/checkout@v4
- uses: foundry-rs/setup-snfoundry@v3
- name: Test
run: snforge test