ci: fix PR workflow - DATABASE_URL in unit tests, Docker CLI in ci-base #39
@@ -58,6 +58,7 @@ jobs:
|
|||||||
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-base:latest \
|
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-base:latest \
|
||||||
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-base:playwright-${{ steps.meta.outputs.playwright_version }} \
|
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-base:playwright-${{ steps.meta.outputs.playwright_version }} \
|
||||||
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-base:${{ github.sha }} \
|
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-base:${{ github.sha }} \
|
||||||
|
.
|
||||||
|
|
||||||
- name: Clean up
|
- name: Clean up
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ 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
|
||||||
|
env:
|
||||||
|
DATABASE_URL: postgresql://user:pass@localhost:5432/dummy
|
||||||
|
|
||||||
build-and-deploy-ci:
|
build-and-deploy-ci:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
+9
-1
@@ -5,7 +5,15 @@
|
|||||||
FROM mcr.microsoft.com/playwright:v1.59.1-jammy AS base
|
FROM mcr.microsoft.com/playwright:v1.59.1-jammy AS base
|
||||||
|
|
||||||
# Install unzip (required for Bun installation) and other tools
|
# Install unzip (required for Bun installation) and other tools
|
||||||
RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y unzip ca-certificates curl gnupg lsb-release && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Docker CLI (for building/pushing images in CI)
|
||||||
|
RUN install -m 0755 -d /etc/apt/keyrings && \
|
||||||
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
|
||||||
|
chmod a+r /etc/apt/keyrings/docker.gpg && \
|
||||||
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
|
||||||
|
apt-get update && apt-get install -y docker-ce-cli docker-compose-plugin && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install Bun (latest version)
|
# Install Bun (latest version)
|
||||||
# Note: The playwright image already has Node.js pre-installed
|
# Note: The playwright image already has Node.js pre-installed
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
# CI Pipeline Test Trigger
|
||||||
|
|
||||||
|
This file is used to trigger the PR workflow for testing the CI pipeline.
|
||||||
|
Remove this file after validation is complete.
|
||||||
Reference in New Issue
Block a user