fix(build): slim build and better ci #302
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Code Tests | |
| on: | |
| pull_request: | |
| branches: ["dev"] | |
| push: | |
| branches: ["dev"] | |
| concurrency: | |
| group: code-test-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| tests: | |
| name: Backend Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| build-essential \ | |
| curl \ | |
| wget \ | |
| file \ | |
| libxdo-dev \ | |
| libssl-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| libasound2-dev \ | |
| pkg-config | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v5 | |
| with: | |
| version: latest | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: lts/* | |
| cache: "pnpm" | |
| - name: Install frontend dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run workspace checks | |
| run: | | |
| cargo check --workspace | |
| cargo test -p rgsm-core --lib | |
| - name: Run slim build checks | |
| run: | | |
| cargo check -p rgsm-core --no-default-features | |
| cargo test -p rgsm-core --no-default-features --lib |