feat(ci): add cargo-check job with Turborepo + Swatinem cache
This commit is contained in:
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
@@ -17,9 +17,30 @@ jobs:
|
||||
|
||||
- run: pnpm turbo lint typecheck test build --filter=@openconcho/web
|
||||
|
||||
cargo-check:
|
||||
name: Rust compile check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Linux dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: packages/desktop/src-tauri -> target
|
||||
|
||||
- uses: ./.github/actions/setup
|
||||
|
||||
- run: pnpm turbo cargo-check --filter=@openconcho/desktop
|
||||
|
||||
release:
|
||||
name: Release
|
||||
needs: check
|
||||
needs: [check, cargo-check]
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
"scripts": {
|
||||
"dev": "tauri dev",
|
||||
"build": "tauri build",
|
||||
"tauri": "tauri"
|
||||
"tauri": "tauri",
|
||||
"cargo-check": "cargo check --manifest-path src-tauri/Cargo.toml"
|
||||
},
|
||||
"dependencies": {
|
||||
"@openconcho/web": "workspace:*"
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
"test": {
|
||||
"inputs": ["src/**", "vitest.config.*", "package.json"]
|
||||
},
|
||||
"cargo-check": {
|
||||
"inputs": ["src-tauri/src/**", "src-tauri/Cargo.toml", "src-tauri/Cargo.lock"],
|
||||
"outputs": []
|
||||
},
|
||||
"dev": {
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
|
||||
Reference in New Issue
Block a user