name: Cargo Build & Test
on:
pull_request:
push:
branches:
- main
- release/**
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
check_build_and_test:
name: Check, Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo check --verbose
- run: cargo build --verbose
- run: cargo test --verbose