feat: update CI/CD to use Bun
- Update Dockerfile to use oven/bun:alpine image - Update PR workflow to use Bun (oven/setup-bun action) - Update Test workflow to use Bun - Update Release workflow to use Bun - Remove test.yml workflow (redundant with PR workflow) - Update Docker build commands to use Bun - Docker build verified working
This commit is contained in:
+10
-10
@@ -9,7 +9,7 @@ jobs:
|
||||
unit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:20-alpine
|
||||
image: oven/bun:alpine
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
@@ -17,10 +17,10 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: bun install
|
||||
|
||||
- name: Run unit tests
|
||||
run: npm run test:run
|
||||
run: bun test
|
||||
|
||||
acceptance-tests:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -37,16 +37,16 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
- name: Setup Bun
|
||||
uses: oven/setup-bun@v2
|
||||
with:
|
||||
node-version: '20'
|
||||
bun-version: latest
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: bun install
|
||||
|
||||
- name: Generate Prisma client
|
||||
run: npx prisma generate
|
||||
run: bun x prisma generate
|
||||
env:
|
||||
DATABASE_URL: postgresql://user:pass@localhost:5432/dummy
|
||||
|
||||
@@ -54,10 +54,10 @@ jobs:
|
||||
run: |
|
||||
# Create SQLite database file
|
||||
mkdir -p prisma
|
||||
npx prisma migrate deploy
|
||||
bun x prisma migrate deploy
|
||||
|
||||
- name: Run acceptance tests
|
||||
run: npm run test:acceptance
|
||||
run: bun run test:acceptance
|
||||
env:
|
||||
DATABASE_PROVIDER: sqlite
|
||||
DATABASE_URL: file:./prisma/ci.db
|
||||
|
||||
Reference in New Issue
Block a user