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
This commit is contained in:
2026-04-23 21:40:55 +08:00
parent 15dc2c1a3c
commit 4f00f215fc
+31
View File
@@ -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