mirror of https://github.com/buster-so/buster.git
a few optimizations
This commit is contained in:
parent
6aa1442b06
commit
9905f16ed1
|
@ -7,7 +7,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: blacksmith-16vcpu-ubuntu-2204
|
runs-on: blacksmith-32vcpu-ubuntu-2204
|
||||||
environment: testing
|
environment: testing
|
||||||
|
|
||||||
# Service container for Redis (needed by the setup action)
|
# Service container for Redis (needed by the setup action)
|
||||||
|
@ -31,10 +31,23 @@ jobs:
|
||||||
- name: Setup Test Environment
|
- name: Setup Test Environment
|
||||||
uses: ./.github/actions/setup-test-environment
|
uses: ./.github/actions/setup-test-environment
|
||||||
|
|
||||||
|
- name: Mount Cargo Home Cache (Sticky Disk)
|
||||||
|
uses: useblacksmith/stickydisk@v1
|
||||||
|
with:
|
||||||
|
key: ${{ github.repository }}-cargo-home # Unique key per repository
|
||||||
|
path: ~/.cargo # Cache cargo registry/git data
|
||||||
|
|
||||||
|
- name: Mount API Target Cache (Sticky Disk)
|
||||||
|
uses: useblacksmith/stickydisk@v1
|
||||||
|
with:
|
||||||
|
key: ${{ github.repository }}-api-target # Unique key per repository
|
||||||
|
path: ./api/target # Cache build artifacts
|
||||||
|
|
||||||
- name: Run API Tests
|
- name: Run API Tests
|
||||||
working-directory: ./api # Tests run from the api directory
|
working-directory: ./api # Tests run from the api directory
|
||||||
run: cargo test --workspace # Run tests for all packages in the api workspace
|
run: cargo test --workspace # Run tests for all packages in the api workspace
|
||||||
env:
|
env:
|
||||||
|
RUST_TEST_THREADS: 24
|
||||||
# Use hardcoded default values and secrets
|
# Use hardcoded default values and secrets
|
||||||
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:54322/postgres
|
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:54322/postgres
|
||||||
REDIS_URL: redis://localhost:6379 # Connect to the Redis service container
|
REDIS_URL: redis://localhost:6379 # Connect to the Redis service container
|
||||||
|
|
|
@ -7,7 +7,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: blacksmith-16vcpu-ubuntu-2204 # Using a powerful runner as requested
|
runs-on: blacksmith-32vcpu-ubuntu-2204 # Using a powerful runner as requested
|
||||||
environment: testing
|
environment: testing
|
||||||
|
|
||||||
# Service containers
|
# Service containers
|
||||||
|
@ -28,11 +28,6 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# --- Build API Docker Image with Blacksmith Caching ---
|
# --- Build API Docker Image with Blacksmith Caching ---
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Build and Load API Docker Image
|
- name: Build and Load API Docker Image
|
||||||
uses: useblacksmith/build-push-action@v1
|
uses: useblacksmith/build-push-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -85,6 +80,7 @@ jobs:
|
||||||
working-directory: ./cli # Tests run from the cli directory
|
working-directory: ./cli # Tests run from the cli directory
|
||||||
run: cargo test --workspace # Run tests for all packages in the cli workspace
|
run: cargo test --workspace # Run tests for all packages in the cli workspace
|
||||||
env:
|
env:
|
||||||
|
RUST_TEST_THREADS: 24
|
||||||
# Point to services on host (DB/Supabase/Redis) and API container
|
# Point to services on host (DB/Supabase/Redis) and API container
|
||||||
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:54322/postgres
|
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:54322/postgres
|
||||||
REDIS_URL: redis://localhost:6379 # Tests run on host, connect to exposed Redis port
|
REDIS_URL: redis://localhost:6379 # Tests run on host, connect to exposed Redis port
|
||||||
|
|
|
@ -7,7 +7,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: blacksmith-16vcpu-ubuntu-2204
|
runs-on: blacksmith-32vcpu-ubuntu-2204
|
||||||
environment: testing
|
environment: testing
|
||||||
|
|
||||||
# Service containers
|
# Service containers
|
||||||
|
@ -49,11 +49,6 @@ jobs:
|
||||||
uses: ./.github/actions/setup-test-environment
|
uses: ./.github/actions/setup-test-environment
|
||||||
|
|
||||||
# --- Build API Docker Image with Blacksmith Caching ---
|
# --- Build API Docker Image with Blacksmith Caching ---
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Build and Load API Docker Image
|
- name: Build and Load API Docker Image
|
||||||
uses: useblacksmith/build-push-action@v1
|
uses: useblacksmith/build-push-action@v1
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in New Issue