feat/bun-transition #21

Merged
david merged 24 commits from feat/bun-transition into main 2026-04-02 04:51:20 +00:00
4 changed files with 27 additions and 36 deletions
Showing only changes of commit 2cf832eeac - Show all commits
+1 -32
View File
@@ -27,40 +27,9 @@ jobs:
- name: Run unit tests - name: Run unit tests
run: bun test src/__tests__/unit/ src/__tests__/*.test.tsx src/__tests__/auth-simple.test.ts run: bun test src/__tests__/unit/ src/__tests__/*.test.tsx src/__tests__/auth-simple.test.ts
acceptance-tests:
runs-on: ubuntu-latest
needs: unit-tests
container:
image: docker.notsosm.art/euchre-camp/ci-base:latest
options: --user root
env:
DATABASE_PROVIDER: postgresql
DATABASE_URL: postgresql://euchre_camp:LINGO5row_hiding@dhg.lol:5432/euchre_camp_dev
BETTER_AUTH_SECRET: test-secret-key-for-ci-only
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: bun install
- name: Generate Prisma client
run: bun x prisma generate
env:
DATABASE_URL: postgresql://euchre_camp:LINGO5row_hiding@dhg.lol:5432/euchre_camp_dev
- name: Setup PostgreSQL database
run: bun x prisma migrate deploy
env:
DATABASE_URL: postgresql://euchre_camp:LINGO5row_hiding@dhg.lol:5432/euchre_camp_dev
- name: Run acceptance tests
run: bun run test:acceptance
analyze-bump-type: analyze-bump-type:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: acceptance-tests needs: unit-tests
steps: steps:
- name: Checkout code - name: Checkout code
+24 -2
View File
@@ -159,8 +159,30 @@ jobs:
echo " docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" echo " docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
fi fi
- name: Deploy to dev (placeholder) - name: Deploy to dev environment
if: steps.commit.outputs.committed == 'true' if: steps.commit.outputs.committed == 'true'
run: | run: |
echo "Deploying version ${{ steps.version.outputs.new_version }} to dev environment..." echo "Deploying version ${{ steps.version.outputs.new_version }} to dev environment..."
# TODO: Add actual deployment steps
# Update docker-compose.yml with new image tag using full registry path
# The registry is docker.notsosm.art and image is euchre-camp
IMAGE_TAG="${{ steps.version.outputs.new_version }}"
sed -i "s|image: docker.notsosm.art/euchre-camp:[0-9.]*|image: docker.notsosm.art/euchre-camp:${IMAGE_TAG}|" docker-compose.yml
# Pull and restart the dev container
cd /home/euchre_camp
docker-compose pull app
docker-compose up -d app
# Wait for container to be healthy
echo "Waiting for container to start..."
sleep 10
# Check if container is running
if docker ps --filter "name=euchre-camp-app" --format "{{.Status}}" | grep -q "Up"; then
echo "✅ Dev environment successfully deployed with version ${{ steps.version.outputs.new_version }}"
else
echo "❌ Dev environment deployment failed"
docker-compose logs app
exit 1
fi
+1 -1
View File
@@ -3,7 +3,7 @@
services: services:
app: app:
image: euchre-camp/euchre-camp:0.1.0.dev image: docker.notsosm.art/euchre-camp:0.1.0.dev
container_name: euchre-camp-app container_name: euchre-camp-app
ports: ports:
- "3000:3000" - "3000:3000"
+1 -1
View File
@@ -12,7 +12,7 @@ const path = require('path');
const { execSync } = require('child_process'); const { execSync } = require('child_process');
// Configuration // Configuration
const REGISTRY = 'euchre-camp'; const REGISTRY = 'docker.notsosm.art';
const IMAGE_NAME = 'euchre-camp'; const IMAGE_NAME = 'euchre-camp';
// Get current version from package.json // Get current version from package.json