add CI for cairo #60
Workflow file for this run
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: 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 | ||
Check failure on line 57 in .github/workflows/ci.yml GitHub Actions / ciInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
name: Build cartridge-vrf | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- 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 |