a few optimizations

This commit is contained in:
dal 2025-04-29 11:24:34 -06:00
parent 6aa1442b06
commit 9905f16ed1
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
3 changed files with 17 additions and 13 deletions

View File

@ -7,7 +7,7 @@ on:
jobs:
test:
runs-on: blacksmith-16vcpu-ubuntu-2204
runs-on: blacksmith-32vcpu-ubuntu-2204
environment: testing
# Service container for Redis (needed by the setup action)
@ -31,10 +31,23 @@ jobs:
- name: 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
working-directory: ./api # Tests run from the api directory
run: cargo test --workspace # Run tests for all packages in the api workspace
env:
RUST_TEST_THREADS: 24
# Use hardcoded default values and secrets
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:54322/postgres
REDIS_URL: redis://localhost:6379 # Connect to the Redis service container

View File

@ -7,7 +7,7 @@ on:
jobs:
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
# Service containers
@ -28,11 +28,6 @@ jobs:
uses: actions/checkout@v4
# --- 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
uses: useblacksmith/build-push-action@v1
with:
@ -85,6 +80,7 @@ jobs:
working-directory: ./cli # Tests run from the cli directory
run: cargo test --workspace # Run tests for all packages in the cli workspace
env:
RUST_TEST_THREADS: 24
# Point to services on host (DB/Supabase/Redis) and API container
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

View File

@ -7,7 +7,7 @@ on:
jobs:
test:
runs-on: blacksmith-16vcpu-ubuntu-2204
runs-on: blacksmith-32vcpu-ubuntu-2204
environment: testing
# Service containers
@ -49,11 +49,6 @@ jobs:
uses: ./.github/actions/setup-test-environment
# --- 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
uses: useblacksmith/build-push-action@v1
with: