add GitHub Actions workflow to build and test I got from somewhere (I don't remember where)

This commit is contained in:
2024-07-12 20:04:47 -04:00
parent b1f8c37451
commit fc0329c7e3

28
.github/workflows/build-and-test.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Cargo Build & Test
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: Rust project - latest
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
toolchain:
- stable
- beta
- nightly
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build --verbose
- run: cargo test --verbose