From 4f00f215fc31d339f0abac5866b8435253063fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=94=B7?= Date: Thu, 23 Apr 2026 21:40:55 +0800 Subject: [PATCH] ci add github actions workflow for rust workspace checks Run cargo check for the backend workspace with required Postgres build dependencies on push/pull_request. Made-with: Cursor --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5928081 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: Rust Backend CI + +on: + push: + branches: + - master + - main + pull_request: + +jobs: + check: + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libpq-dev pkg-config clang + + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo registry and target + uses: Swatinem/rust-cache@v2 + + - name: Cargo check workspace + run: cargo check --workspace --all-targets