mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-03-22 19:05:08 +00:00
build images using depot
This commit is contained in:
62
.github/workflows/e2e-tests.yml
vendored
62
.github/workflows/e2e-tests.yml
vendored
@@ -19,39 +19,9 @@ permissions:
|
|||||||
id-token: write
|
id-token: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
|
||||||
if: github.event.pull_request.head.ref != 'i18n_crowdin'
|
|
||||||
runs-on: depot-ubuntu-24.04-16
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Build and export
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: docker/Dockerfile
|
|
||||||
push: false
|
|
||||||
load: false
|
|
||||||
tags: pocket-id:test
|
|
||||||
outputs: type=docker,dest=/tmp/docker-image.tar
|
|
||||||
build-args: BUILD_TAGS=e2etest
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
|
|
||||||
- name: Upload Docker image artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: docker-image
|
|
||||||
path: /tmp/docker-image.tar
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
if: github.event.pull_request.head.ref != 'i18n_crowdin'
|
if: github.event.pull_request.head.ref != 'i18n_crowdin'
|
||||||
runs-on: depot-ubuntu-24.04-16
|
runs-on: depot-ubuntu-24.04-16
|
||||||
needs: build
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -79,6 +49,12 @@ jobs:
|
|||||||
node-version: 24
|
node-version: 24
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
|
- name: Set up Depot CLI
|
||||||
|
uses: depot/setup-action@v1
|
||||||
|
|
||||||
|
- name: Set up Depot Docker builder
|
||||||
|
run: depot configure-docker
|
||||||
|
|
||||||
- name: Cache Playwright Browsers
|
- name: Cache Playwright Browsers
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
id: playwright-cache
|
id: playwright-cache
|
||||||
@@ -101,21 +77,6 @@ jobs:
|
|||||||
if: matrix.db == 'postgres' && steps.postgres-cache.outputs.cache-hit == 'true'
|
if: matrix.db == 'postgres' && steps.postgres-cache.outputs.cache-hit == 'true'
|
||||||
run: docker load < /tmp/postgres-image.tar
|
run: docker load < /tmp/postgres-image.tar
|
||||||
|
|
||||||
- name: Cache LLDAP Docker image
|
|
||||||
uses: actions/cache@v4
|
|
||||||
id: lldap-cache
|
|
||||||
with:
|
|
||||||
path: /tmp/lldap-image.tar
|
|
||||||
key: lldap-stable-${{ runner.os }}
|
|
||||||
- name: Pull and save LLDAP image
|
|
||||||
if: steps.lldap-cache.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
docker pull lldap/lldap:2025-05-19
|
|
||||||
docker save lldap/lldap:2025-05-19 > /tmp/lldap-image.tar
|
|
||||||
- name: Load LLDAP image
|
|
||||||
if: steps.lldap-cache.outputs.cache-hit == 'true'
|
|
||||||
run: docker load < /tmp/lldap-image.tar
|
|
||||||
|
|
||||||
- name: Cache SCIM Test Server Docker image
|
- name: Cache SCIM Test Server Docker image
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
id: scim-cache
|
id: scim-cache
|
||||||
@@ -163,15 +124,6 @@ jobs:
|
|||||||
if: matrix.storage == 's3' && steps.aws-cli-cache.outputs.cache-hit == 'true'
|
if: matrix.storage == 's3' && steps.aws-cli-cache.outputs.cache-hit == 'true'
|
||||||
run: docker load < /tmp/aws-cli-image.tar
|
run: docker load < /tmp/aws-cli-image.tar
|
||||||
|
|
||||||
- name: Download Docker image artifact
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: docker-image
|
|
||||||
path: /tmp
|
|
||||||
|
|
||||||
- name: Load Docker image
|
|
||||||
run: docker load -i /tmp/docker-image.tar
|
|
||||||
|
|
||||||
- name: Install test dependencies
|
- name: Install test dependencies
|
||||||
run: pnpm --filter pocket-id-tests install --frozen-lockfile
|
run: pnpm --filter pocket-id-tests install --frozen-lockfile
|
||||||
|
|
||||||
@@ -197,7 +149,7 @@ jobs:
|
|||||||
DOCKER_COMPOSE_FILE=docker-compose-s3.yml
|
DOCKER_COMPOSE_FILE=docker-compose-s3.yml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker compose -f "$DOCKER_COMPOSE_FILE" up -d
|
docker compose -f "$DOCKER_COMPOSE_FILE" up -d --build
|
||||||
|
|
||||||
{
|
{
|
||||||
LOG_FILE="/tmp/backend.log"
|
LOG_FILE="/tmp/backend.log"
|
||||||
|
|||||||
Reference in New Issue
Block a user