Update github workflow to use rustup and multiple rust versions

This commit is contained in:
Denis Redozubov 2023-06-28 21:51:21 +04:00
parent d8f1fa078f
commit f30e16a63f

View file

@ -1,22 +1,24 @@
name: Rust name: Cargo Build & Test
on: on:
push: push:
branches: [ "master" ]
pull_request: pull_request:
branches: [ "master" ]
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
jobs: jobs:
build: build_and_test:
name: Rust project - latest
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Build - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
run: cargo build --verbose - run: cargo build --verbose
- name: Run tests - run: cargo test --verbose
run: cargo test --verbose