From 3d47b7f9273b69556286de8fce1d2b5f88e9f309 Mon Sep 17 00:00:00 2001 From: Dustin Ray <40841027+drcapybara@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:51:26 -0800 Subject: [PATCH] Update rust.yml --- .github/workflows/rust.yml | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1816687..fe4aee8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,21 +1,38 @@ -name: Tests +name: Rust project CI on: push: - branches: [ "master" ] + branches: [ main ] pull_request: - branches: [ "master" ] - -env: - CARGO_TERM_COLOR: always + branches: [ main ] jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v2 + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Check formatting + uses: actions-rs/cargo@v1 + with: + command: fmt + args: -- --check + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --verbose + + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --verbose