diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index d836e98..5136fc0 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -28,3 +28,44 @@ jobs: - name: Test run: bun run test + + e2e: + runs-on: ubuntu-latest + needs: ci + + services: + postgres: + image: postgres:16 + env: + POSTGRES_USER: lunarfront + POSTGRES_PASSWORD: lunarfront + POSTGRES_DB: postgres + options: >- + --health-cmd pg_isready + --health-interval 5s + --health-timeout 3s + --health-retries 5 + + valkey: + image: valkey/valkey:8 + options: >- + --health-cmd "valkey-cli ping" + --health-interval 5s + --health-timeout 3s + --health-retries 5 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Bun + run: | + curl -fsSL https://bun.sh/install | bash + echo "$HOME/.bun/bin" >> $GITHUB_PATH + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Run API tests + working-directory: packages/backend + run: bun run api-test