aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-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