Skip to content

Modern Docker Management, Designed for Everyone

chore: add depot cache mounts

Kyle Mendell4da2cef0a6c1
diff --git a/.depot/workflows/ci.yml b/.depot/workflows/ci.yml
index a13696469..a92ed98ce 100644
--- a/.depot/workflows/ci.yml
+++ b/.depot/workflows/ci.yml
@@ -22,6 +22,8 @@ jobs:
name: Go Tests (${{ matrix.module.name }})
runs-on: depot-ubuntu-latest
timeout-minutes: 30
+ env:
+ GOMODCACHE: /tmp/arcane-ci-cache/go-tests/${{ matrix.module.name }}/go-mod
strategy:
fail-fast: false
matrix:
@@ -56,8 +58,14 @@ jobs:
uses: actions/setup-go@v6
with:
go-version-file: ${{ matrix.module.path }}/go.mod
- cache: true
- cache-dependency-path: ${{ matrix.module.path }}/go.sum
+ cache: false
+
+ - name: Mount Go module cache
+ uses: depot/cache-mount@v1
+ with:
+ path: /tmp/arcane-ci-cache
+ name: getarcaneapp-arcane-main-ci
+ write-lock: /tmp/arcane-ci-cache/go-tests/${{ matrix.module.name }}
- name: Install GCC
if: matrix.module.gcc
@@ -90,6 +98,8 @@ jobs:
go-linter:
name: Go Linter (${{ matrix.module.name }})
runs-on: depot-ubuntu-latest
+ env:
+ GOMODCACHE: /tmp/arcane-ci-cache/go-linter/${{ matrix.module.name }}/go-mod
strategy:
fail-fast: false
matrix:
@@ -108,7 +118,14 @@ jobs:
uses: actions/setup-go@v6
with:
go-version-file: ${{ matrix.module.name }}/go.mod
- cache-dependency-path: ${{ matrix.module.name }}/go.sum
+ cache: false
+
+ - name: Mount Go module cache
+ uses: depot/cache-mount@v1
+ with:
+ path: /tmp/arcane-ci-cache
+ name: getarcaneapp-arcane-main-ci
+ write-lock: /tmp/arcane-ci-cache/go-linter/${{ matrix.module.name }}
- name: Run Golangci-lint
uses: golangci/[email protected]
@@ -121,6 +138,8 @@ jobs:
type-check:
name: Type Check
runs-on: depot-ubuntu-latest
+ env:
+ PNPM_STORE_DIR: /tmp/arcane-ci-cache/type-check/pnpm-store
steps:
- name: Checkout code
uses: actions/[email protected]
@@ -132,7 +151,16 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 26
- cache: pnpm
+
+ - name: Mount pnpm store
+ uses: depot/cache-mount@v1
+ with:
+ path: /tmp/arcane-ci-cache
+ name: getarcaneapp-arcane-main-ci
+ write-lock: /tmp/arcane-ci-cache/type-check
+
+ - name: Configure pnpm store
+ run: pnpm config set store-dir "$PNPM_STORE_DIR"
- name: Setup Just
uses: extractions/setup-just@v4
@@ -152,6 +180,9 @@ jobs:
e2e-tests:
name: E2E Tests (${{ matrix.database.name }})
runs-on: depot-ubuntu-24.04-4
+ env:
+ PNPM_STORE_DIR: /tmp/arcane-ci-cache/e2e/${{ matrix.database.name }}/pnpm-store
+ PLAYWRIGHT_CACHE_ROOT: /tmp/arcane-ci-cache/e2e/${{ matrix.database.name }}/playwright
permissions:
contents: read
actions: write
@@ -185,7 +216,18 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 26
- cache: pnpm
+
+ - name: Mount test dependency cache
+ uses: depot/cache-mount@v1
+ with:
+ path: /tmp/arcane-ci-cache
+ name: getarcaneapp-arcane-main-ci
+ write-lock: /tmp/arcane-ci-cache/e2e/${{ matrix.database.name }}
+
+ - name: Configure test dependency cache
+ run: |
+ pnpm config set store-dir "$PNPM_STORE_DIR"
+ echo "PLAYWRIGHT_BROWSERS_PATH=$PLAYWRIGHT_CACHE_ROOT/${{ hashFiles('pnpm-lock.yaml', 'tests/package.json') }}" >> "$GITHUB_ENV"
- name: Set up Depot CLI
uses: depot/setup-action@v1
@@ -193,15 +235,6 @@ jobs:
- name: Setup depot buildx driver
run: depot configure-docker
- - name: Cache Playwright Browsers
- uses: actions/[email protected]
- id: playwright-cache
- with:
- path: ~/.cache/ms-playwright
- key: ${{ runner.os }}-playwright-${{ hashFiles('tests/pnpm-lock.yaml', 'tests/package.json') }}
- restore-keys: |
- ${{ runner.os }}-playwright-
-
- name: Pull and save test images
run: |
docker pull public.ecr.aws/nginx/nginx:stable-alpine
@@ -236,6 +269,9 @@ jobs:
cli-e2e-tests:
name: CLI E2E Tests (proxy)
runs-on: depot-ubuntu-24.04-4
+ env:
+ GOMODCACHE: /tmp/arcane-ci-cache/cli-e2e/go-mod
+ PNPM_STORE_DIR: /tmp/arcane-ci-cache/cli-e2e/pnpm-store
permissions:
contents: read
actions: write
@@ -253,13 +289,22 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 26
- cache: pnpm
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: cli/go.mod
- cache-dependency-path: cli/go.sum
+ cache: false
+
+ - name: Mount dependency cache
+ uses: depot/cache-mount@v1
+ with:
+ path: /tmp/arcane-ci-cache
+ name: getarcaneapp-arcane-main-ci
+ write-lock: /tmp/arcane-ci-cache/cli-e2e
+
+ - name: Configure pnpm store
+ run: pnpm config set store-dir "$PNPM_STORE_DIR"
- name: Set up Depot CLI
uses: depot/setup-action@v1
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d9252022a..93ac83aea 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -72,15 +72,8 @@ jobs:
- name: Run unit tests
env:
CGO_ENABLED: ${{ matrix.module.cgo_enabled }}
- GO_JUNIT_REPORT_FILE: test-results/junit.xml
run: just test ${{ matrix.module.name }}
- - name: Report Go test results to Depot
- if: ${{ !cancelled() }}
- uses: depot/test-report-action@v1
- with:
- path: ${{ matrix.module.path }}/test-results/
-
- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@v7
@@ -292,11 +285,10 @@ jobs:
run: just deps install tests
- name: Run Playwright E2E tests
- run: mkdir -p tests/test-results && pnpm -C tests exec playwright test --project=chromium
+ run: pnpm -C tests exec playwright test --project=chromium
env:
COMPOSE_FILE: ${{ matrix.database.compose_file }}
BASE_URL: http://localhost:${{ matrix.database.port }}
- PLAYWRIGHT_JUNIT_OUTPUT_FILE: test-results/playwright-${{ matrix.database.name }}.xml
- name: Upload Playwright HTML report
if: always()
@@ -307,12 +299,6 @@ jobs:
include-hidden-files: true
retention-days: 15
- - name: Report Playwright test results to Depot
- if: ${{ !cancelled() }}
- uses: depot/test-report-action@v1
- with:
- path: tests/test-results/
-
cli-e2e-tests:
name: CLI E2E Tests (proxy)
if: ${{ github.head_ref != 'l10n_crowdin' }}
@@ -352,12 +338,11 @@ jobs:
run: pnpm -C tests install
- name: Run CLI E2E tests against socket proxy
- run: mkdir -p tests/test-results && pnpm -C tests exec playwright test --project=cli
+ run: pnpm -C tests exec playwright test --project=cli
env:
COMPOSE_FILE: setup/compose-proxy.yaml
BASE_URL: http://localhost:3002
E2E_ADMIN_STATIC_API_KEY: ${{ secrets.E2E_ADMIN_STATIC_API_KEY }}
- PLAYWRIGHT_JUNIT_OUTPUT_FILE: test-results/playwright-cli.xml
- name: Upload Playwright HTML report
if: always()
@@ -367,9 +352,3 @@ jobs:
path: tests/.report
include-hidden-files: true
retention-days: 15
-
- - name: Report Playwright test results to Depot
- if: ${{ !cancelled() }}
- uses: depot/test-report-action@v1
- with:
- path: tests/test-results/
diff --git a/backend/pkg/utils/notifications/email_sender_test.go b/backend/pkg/utils/notifications/email_sender_test.go
index 951c12679..9f271681d 100644
--- a/backend/pkg/utils/notifications/email_sender_test.go
+++ b/backend/pkg/utils/notifications/email_sender_test.go
@@ -27,7 +27,7 @@ import (
)
const (
- smtpTestHost = "localhost."
+ smtpTestHost = "localhost"
smtpTestConnTimeout = 2 * time.Second
)