aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhozan23 <hozan23@proton.me>2023-11-19 23:32:52 +0300
committerhozan23 <hozan23@proton.me>2023-11-19 23:32:52 +0300
commit314b99fed9632f2aa319c7f21a11fa9a377eba36 (patch)
treeb09add2c9c3a4b229a94502313f752e7f0cd08f2
parent843d4635e038cdd756130bea46094e2bcbaa8bbc (diff)
update github action
-rw-r--r--.github/workflows/rust.yml34
1 files changed, 18 insertions, 16 deletions
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