ci: reduce runner load
This commit is contained in:
+11
-9
@@ -7,6 +7,11 @@ on:
|
|||||||
- main
|
- main
|
||||||
- "feat/**"
|
- "feat/**"
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_BUILD_JOBS: "2"
|
||||||
|
CARGO_INCREMENTAL: "0"
|
||||||
|
RUST_TEST_THREADS: "2"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rust:
|
rust:
|
||||||
name: Rust Checks
|
name: Rust Checks
|
||||||
@@ -41,18 +46,16 @@ jobs:
|
|||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
run: cargo fmt --all --check
|
run: cargo fmt --all --check
|
||||||
|
|
||||||
- name: Check workspace
|
|
||||||
run: cargo check --workspace
|
|
||||||
|
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
run: cargo clippy --workspace --all-targets --all-features --jobs "$CARGO_BUILD_JOBS" -- -D warnings
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --workspace --all-targets
|
run: cargo test --workspace --all-targets --jobs "$CARGO_BUILD_JOBS"
|
||||||
|
|
||||||
ui:
|
ui:
|
||||||
name: UI Checks
|
name: UI Checks
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: rust
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -72,12 +75,10 @@ jobs:
|
|||||||
working-directory: apps/ui
|
working-directory: apps/ui
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Build UI image
|
|
||||||
run: docker build -f apps/ui/Dockerfile .
|
|
||||||
|
|
||||||
frontend-e2e:
|
frontend-e2e:
|
||||||
name: Frontend E2E
|
name: Frontend E2E
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: ui
|
||||||
services:
|
services:
|
||||||
crank-e2e-postgres:
|
crank-e2e-postgres:
|
||||||
image: postgres:16-alpine
|
image: postgres:16-alpine
|
||||||
@@ -119,7 +120,7 @@ jobs:
|
|||||||
run: npx playwright install --with-deps chromium
|
run: npx playwright install --with-deps chromium
|
||||||
|
|
||||||
- name: Prebuild e2e services
|
- name: Prebuild e2e services
|
||||||
run: cargo build -p admin-api -p mcp-server
|
run: cargo build -p admin-api -p mcp-server --jobs "$CARGO_BUILD_JOBS"
|
||||||
|
|
||||||
- name: Run Playwright e2e
|
- name: Run Playwright e2e
|
||||||
working-directory: apps/ui
|
working-directory: apps/ui
|
||||||
@@ -133,6 +134,7 @@ jobs:
|
|||||||
deployment:
|
deployment:
|
||||||
name: Deployment Manifests
|
name: Deployment Manifests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: ui
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|||||||
Reference in New Issue
Block a user