Skip to content

Commit

Permalink
CI: run cargo fmt early (#38)
Browse files Browse the repository at this point in the history
The format check should occur as soon as possible to avoid wasting time.
  • Loading branch information
odesenfans authored Feb 23, 2024
1 parent 17e0df2 commit 0f10fcc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Cargo fmt
run: cargo fmt --check

- name: Log in to Github container registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

Expand All @@ -56,16 +59,12 @@ jobs:
cache_image=$(echo ghcr.io/${GITHUB_REPOSITORY}/build-cache | tr '[:upper:]' '[:lower:]')
echo "STONE_PROVER_DOCKER_CACHE=$(echo ${cache_image})" >> $GITHUB_ENV
- name: Download Docker cache image (if available)
run: docker pull ${STONE_PROVER_DOCKER_CACHE} || true

- name: Build
run: cargo build --verbose

- name: Cargo fmt
run: cargo fmt --check

- name: Lint with Clippy
run: cargo clippy -- -D warnings

Expand Down

0 comments on commit 0f10fcc

Please sign in to comment.