From 314b99fed9632f2aa319c7f21a11fa9a377eba36 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Sun, 19 Nov 2023 23:32:52 +0300 Subject: update github action --- .github/workflows/rust.yml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to '.github') diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b343e63..46a914a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,26 +1,28 @@ -name: Rust +name: Cargo Build & Test on: push: - branches: [ "master" ] pull_request: - branches: [ "master" ] -env: +env: CARGO_TERM_COLOR: always jobs: - build: - + build_and_test: + name: Rust project - latest runs-on: ubuntu-latest - + strategy: + matrix: + toolchain: + - stable steps: - - uses: actions/checkout@v3 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose - - name: Run clippy - run: cargo clippy -- -D warnings - - name: Run fmt - run: cargo fmt -- --check + - uses: actions/checkout@v3 + - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + - name: Run clippy + run: cargo clippy -- -D warnings + - name: Run fmt + run: cargo fmt -- --check -- cgit v1.2.3