From c6b1edd2b9c3502b4fa5439366fa478b4f28bae2 Mon Sep 17 00:00:00 2001 From: Michael Sproul <michael@sigmaprime.io> Date: Mon, 19 Jun 2023 12:10:20 +1000 Subject: [PATCH] Add CI workflow --- .github/workflows/test-suite.yml | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/test-suite.yml diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml new file mode 100644 index 0000000..f120ac4 --- /dev/null +++ b/.github/workflows/test-suite.yml @@ -0,0 +1,35 @@ +name: test-suite + +on: + push: + branches: + - main + - 'pr/*' + pull_request: +env: + # Deny warnings in CI + RUSTFLAGS: "-D warnings" +jobs: + cargo-fmt: + name: cargo-fmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Get latest version of stable Rust + run: rustup update stable + - name: Check formatting with cargo fmt + run: cargo fmt --all -- --check + test: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + name: test-${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Get latest version of stable Rust + run: rustup update stable + - name: Run tests + run: cargo test --release + - name: Check all examples, binaries, etc + run: cargo check --all-targets