From 1dfcd85f846f8ed3e193d25b0f302505ccef185d Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sat, 23 Apr 2022 20:54:46 +0300 Subject: Update github actions --- .github/workflows/rust.yml | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) (limited to '.github/workflows/rust.yml') diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 79251f5..f1cc36d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,22 +1,40 @@ -name: Rust +name: Check and Lint on: - push: - branches: [ main ] pull_request: - branches: [ main ] - + push: + branches: + - main + env: CARGO_TERM_COLOR: always jobs: - build: - + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + fmt: + name: Rustfmt runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check -- cgit v1.2.3-70-g09d2