From 684ef0e3dd1372a40eda4f255458ba036c8f1393 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Tue, 13 Jan 2026 14:36:24 +0800 Subject: feat: add GitHub Actions workflow for testing and building across multiple platforms --- .github/workflows/test.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/test.yml (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..28f341b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,44 @@ +name: Test & Build + +on: + push: + branches: ["main", "master", "dev"] + pull_request: + branches: ["main", "master", "dev"] + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + name: Test on ${{ matrix.platform }} + runs-on: ${{ matrix.platform }} + strategy: + fail-fast: false + matrix: + platform: [ubuntu-22.04, windows-latest, macos-14] + + steps: + - uses: actions/checkout@v4 + + - name: Install Dependencies (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Rust Cache + uses: swatinem/rust-cache@v2 + with: + workspaces: ./src-tauri + + - name: Run Tests + working-directory: ./src-tauri + run: cargo test --verbose + + - name: Build (Dev) + working-directory: ./src-tauri + run: cargo build --verbose -- cgit v1.2.3-70-g09d2