From 673409bf224c0a3bcad608c4068af6d08dd34a5d Mon Sep 17 00:00:00 2001 From: Azalea Date: Tue, 12 May 2026 10:09:15 +0800 Subject: [PATCH] [U] Only build on release Removed push and pull_request triggers from workflow. --- .github/workflows/build.yml | 7 ++----- .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c5484ce..8faec6f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,11 +4,6 @@ name: Build executables release: types: - published - push: - branches: - - main - pull_request: - workflow_dispatch: permissions: contents: read @@ -117,6 +112,8 @@ jobs: - name: Install Zig uses: mlugg/setup-zig@v2 + with: + version: 0.14.1 - name: Install cargo-zigbuild uses: taiki-e/install-action@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..27752b8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: Test + +"on": + push: + branches: + - main + pull_request: + workflow_dispatch: + +permissions: + contents: read + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + name: Cargo test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache Rust builds + uses: Swatinem/rust-cache@v2 + + - name: Test + run: cargo test --locked