From 84b30f1c2f9341216beb314df33dbab88b9280a5 Mon Sep 17 00:00:00 2001 From: Congyu <52687642+Congyuwang@users.noreply.github.com> Date: Thu, 21 Dec 2023 13:03:55 +0800 Subject: [PATCH] Create tests.yml --- .github/workflows/tests.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..cf327ed --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,32 @@ +name: Tests + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: rust-toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + profile: minimal + components: rustfmt, clippy + - name: Format check + run: cargo fmt --check + - name: Clippy + run: cargo clippy -- -D warnings + - name: Build + run: cargo build --verbose --release + - name: Run tests + run: cargo test --release