From a9cca19acf5a0221661313abad4b1eac2d72b16e Mon Sep 17 00:00:00 2001 From: Erik Nordin Date: Wed, 31 Jan 2024 19:33:33 -0600 Subject: [PATCH] Add rustfmt to CI --- .github/workflows/rust.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 130e1febf..32bf2c1aa 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,14 +10,27 @@ env: CARGO_TERM_COLOR: always jobs: - build: - + check-format: runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Check formatting + run: cargo fmt -- --check + build: + runs-on: ubuntu-latest + needs: check-format steps: - uses: actions/checkout@v3 - name: Build run: cargo build --verbose + + test: + runs-on: ubuntu-latest + needs: + - build + steps: + - uses: actions/checkout@v3 - name: Run tests run: cargo test --verbose -- --test-threads=1 - name: Install cargo-llvm-cov @@ -30,4 +43,3 @@ jobs: files: codecov.json fail_ci_if_error: true uses: codecov/codecov-action@v3 -