name: Cargo Build & Test
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '50 0 * * 1'
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: Rust project
runs-on: ${{ matrix.os }}
strategy:
matrix:
toolchain: [ stable, beta, nightly, 1.85.0 ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build --verbose --all-features
- run: cargo test --verbose --all-features