From ddadfe1253069391dfe15e42cf87b7fdb0dc4a33 Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 19 Oct 2024 22:30:14 +0200 Subject: [PATCH] ci: add test and build workflows --- .github/workflows/test.yml | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..3508213 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,48 @@ +name: test + +on: + push: + pull_request: + types: [synchronize, review_requested] + +env: + CARGO_TERM_COLOR: always + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + toolchain: + - stable + - beta + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.toolchain }} + - run: cargo test --verbose + + build: + runs-on: ${{ matrix.runner }} + needs: [test] + strategy: + fail-fast: false + matrix: + runner: + - ubuntu-latest + - windows-latest + - macos-latest + toolchain: + - stable + - beta + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.toolchain }} + - run: cargo build --release --verbose