mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-19 11:24:57 -05:00
Bumps the github-actions group with 14 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `6.0.3` | `7.0.1` | | [pnpm/action-setup](https://github.com/pnpm/action-setup) | `6.0.8` | `6.1.0` | | [actions/setup-node](https://github.com/actions/setup-node) | `6.4.0` | `7.1.0` | | [actions/labeler](https://github.com/actions/labeler) | `6.1.0` | `7.0.0` | | [korthout/backport-action](https://github.com/korthout/backport-action) | `4.5.2` | `4.7.0` | | [actions/cache](https://github.com/actions/cache) | `5.0.5` | `6.1.0` | | [re-actors/alls-green](https://github.com/re-actors/alls-green) | `1.2.2` | `1.3.0` | | [anthropics/claude-code-action](https://github.com/anthropics/claude-code-action) | `1.0.142` | `1.0.248` | | [denoland/setup-deno](https://github.com/denoland/setup-deno) | `2.0.4` | `2.0.5` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.6.2` | `7.0.2` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `8.0.1` | `8.0.2` | | [changesets/action](https://github.com/changesets/action) | `1.9.0` | `2.1.2` | | [marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment) | `3.0.4` | `3.0.5` | | [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) | `0.5.6` | `0.6.4` | Updates `actions/checkout` from 6.0.3 to 7.0.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/df4cb1c069e1874edd31b4311f1884172cec0e10...3d3c42e5aac5ba805825da76410c181273ba90b1) Updates `pnpm/action-setup` from 6.0.8 to 6.1.0 - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](https://github.com/pnpm/action-setup/compare/0e279bb959325dab635dd2c09392533439d90093...ea17c68df8912ef543352723c149a84f56e3d413) Updates `actions/setup-node` from 6.4.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e...949feb2413d6458794dcd2491c4babbbce0c15c1) Updates `actions/labeler` from 6.1.0 to 7.0.0 - [Release notes](https://github.com/actions/labeler/releases) - [Commits](https://github.com/actions/labeler/compare/f27b608878404679385c85cfa523b85ccb86e213...bf12e9b00b37c5c0ca2b87b79b2daf7891dbda13) Updates `korthout/backport-action` from 4.5.2 to 4.7.0 - [Release notes](https://github.com/korthout/backport-action/releases) - [Commits](https://github.com/korthout/backport-action/compare/66065406958f46e82238fd59546f5a99e69e22aa...8560fb503c275d433c56f05a2f64850093baa9f7) Updates `actions/cache` from 5.0.5 to 6.1.0 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/27d5ce7f107fe9357f9df03efb73ab90386fccae...55cc8345863c7cc4c66a329aec7e433d2d1c52a9) Updates `re-actors/alls-green` from 1.2.2 to 1.3.0 - [Release notes](https://github.com/re-actors/alls-green/releases) - [Commits](https://github.com/re-actors/alls-green/compare/05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe...b5b5b37504aa4183270bd3d855c52a67f212be35) Updates `anthropics/claude-code-action` from 1.0.142 to 1.0.248 - [Release notes](https://github.com/anthropics/claude-code-action/releases) - [Commits](https://github.com/anthropics/claude-code-action/compare/11ba60486e4aec9ddfeafcf4bb3f00b028ac2c16...1d6de8cb0c237e7c15e9e1bdf973826ebae490cc) Updates `denoland/setup-deno` from 2.0.4 to 2.0.5 - [Release notes](https://github.com/denoland/setup-deno/releases) - [Commits](https://github.com/denoland/setup-deno/compare/667a34cdef165d8d2b2e98dde39547c9daac7282...22d081ff2d3a40755e97629de92e3bcbfa7cf2ed) Updates `actions/upload-artifact` from 4.6.2 to 7.0.2 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4.6.2...cf430e030ddbb5b0abf93d22962f4752f3646cd9) Updates `actions/download-artifact` from 8.0.1 to 8.0.2 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c...9000827ccba6bdab643e8b6fd33ac0654aef8333) Updates `changesets/action` from 1.9.0 to 2.1.2 - [Release notes](https://github.com/changesets/action/releases) - [Changelog](https://github.com/changesets/action/blob/main/CHANGELOG.md) - [Commits](https://github.com/changesets/action/compare/a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d...ae32849d5ba541f9ae29e40e22a623bc13562f51) Updates `marocchino/sticky-pull-request-comment` from 3.0.4 to 3.0.5 - [Release notes](https://github.com/marocchino/sticky-pull-request-comment/releases) - [Commits](https://github.com/marocchino/sticky-pull-request-comment/compare/0ea0beb66eb9baf113663a64ec522f60e49231c0...5770ad5eb8f42dd2c4f34da00c94c5381e49af88) Updates `zizmorcore/zizmor-action` from 0.5.6 to 0.6.4 - [Release notes](https://github.com/zizmorcore/zizmor-action/releases) - [Commits](https://github.com/zizmorcore/zizmor-action/compare/5f14fd08f7cf1cb1609c1e344975f152c7ee938d...cc914d7f3750a2d13d75c7f184a1060aa0e9d482) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: pnpm/action-setup dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/setup-node dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/labeler dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: korthout/backport-action dependency-version: 4.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/cache dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: re-actors/alls-green dependency-version: 1.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: anthropics/claude-code-action dependency-version: 1.0.248 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: denoland/setup-deno dependency-version: 2.0.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/upload-artifact dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/download-artifact dependency-version: 8.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: changesets/action dependency-version: 2.1.2 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: marocchino/sticky-pull-request-comment dependency-version: 3.0.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: zizmorcore/zizmor-action dependency-version: 0.6.4 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
263 lines
10 KiB
YAML
263 lines
10 KiB
YAML
name: E2E
|
|
on:
|
|
push:
|
|
branches: [ main, next ]
|
|
merge_group:
|
|
pull_request:
|
|
|
|
env:
|
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
TURBO_TEAM: ${{ vars.TURBO_TEAM || github.repository_owner }}
|
|
BETTER_AUTH_TELEMETRY_ENDPOINT: ${{ vars.BETTER_AUTH_TELEMETRY_ENDPOINT }}
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.merge_group.head_ref || github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
smoke:
|
|
name: Smoke test (${{ matrix.node-version }})
|
|
timeout-minutes: 30
|
|
runs-on: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'better-auth/better-auth' || github.event_name != 'pull_request' && github.repository == 'better-auth/better-auth') && 'starsling-ubuntu-26.04' || 'ubuntu-24.04' }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node-version: [22.x, 24.x]
|
|
permissions:
|
|
contents: read
|
|
env:
|
|
COMPOSE_SERVICES: redis
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Cache turbo build setup
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
with:
|
|
path: .turbo
|
|
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-turbo-
|
|
|
|
- uses: better-auth/shared-workflows/.github/actions/setup-pnpm@08e5520e7a829b03bee1152913682b67d2ba44b1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Build
|
|
run: pnpm build
|
|
|
|
- name: Reset Docker Containers
|
|
run: docker compose down --volumes --remove-orphans
|
|
|
|
- name: Start Docker Containers
|
|
run: |
|
|
read -r -a compose_services <<< "$COMPOSE_SERVICES"
|
|
docker compose up -d --wait --wait-timeout 60 "${compose_services[@]}"
|
|
|
|
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
|
|
|
- uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5
|
|
with:
|
|
deno-version: 2.6.4
|
|
|
|
- name: Smoke
|
|
timeout-minutes: 10
|
|
run: pnpm e2e:smoke
|
|
|
|
- name: Docker Compose Diagnostics
|
|
if: failure() && hashFiles('docker-compose.yml') != ''
|
|
run: |
|
|
read -r -a compose_services <<< "$COMPOSE_SERVICES"
|
|
docker compose ps --all || true
|
|
docker compose logs --no-color "${compose_services[@]}" || true
|
|
|
|
- name: Stop Docker Containers
|
|
if: always() && hashFiles('docker-compose.yml') != ''
|
|
run: docker compose down --volumes --remove-orphans
|
|
integration:
|
|
name: Integration test
|
|
timeout-minutes: 60
|
|
runs-on: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'better-auth/better-auth' || github.event_name != 'pull_request' && github.repository == 'better-auth/better-auth') && 'starsling-ubuntu-26.04' || 'ubuntu-24.04' }}
|
|
permissions:
|
|
contents: read
|
|
env:
|
|
COMPOSE_SERVICES: postgres
|
|
# Playwright 1.58 has no Ubuntu 26.04 browser build (support starts in 1.61), so use the
|
|
# Ubuntu 24.04 build. Remove this once Playwright is 1.61 or later.
|
|
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE: ubuntu24.04-x64
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Cache turbo build setup
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
with:
|
|
path: .turbo
|
|
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-turbo-
|
|
|
|
- uses: better-auth/shared-workflows/.github/actions/setup-pnpm@08e5520e7a829b03bee1152913682b67d2ba44b1
|
|
|
|
- name: Install Next.js demo
|
|
run: pnpm --dir demo/nextjs install --frozen-lockfile
|
|
|
|
- name: Install Playwright Browsers
|
|
uses: ./.github/actions/setup-playwright
|
|
|
|
- name: Reset Docker Containers
|
|
run: docker compose down --volumes --remove-orphans
|
|
|
|
- name: Start Docker Containers
|
|
run: |
|
|
read -r -a compose_services <<< "$COMPOSE_SERVICES"
|
|
docker compose up -d --wait --wait-timeout 60 "${compose_services[@]}"
|
|
|
|
- name: Integration
|
|
run: pnpm e2e:integration --filter=./e2e/integration
|
|
|
|
- name: Build Next.js demo
|
|
working-directory: demo/nextjs
|
|
env:
|
|
BETTER_AUTH_SECRET: better-auth-scim-demo-ci-secret-at-least-thirty-two-characters
|
|
BETTER_AUTH_URL: http://127.0.0.1:3000
|
|
DEMO_SQLITE_PATH: ${{ runner.temp }}/better-auth-scim-demo-build.sqlite
|
|
SCIM_DEMO_ENABLED: "true"
|
|
SCIM_DEMO_OIDC_CLIENT_SECRET: better-auth-scim-demo-ci-oidc-client-secret
|
|
SCIM_DEMO_TOKEN: better-auth-scim-demo-ci-token
|
|
run: pnpm build
|
|
|
|
- name: Upload integration browser artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
with:
|
|
name: integration-playwright-artifacts
|
|
path: |
|
|
e2e/integration/playwright-report
|
|
e2e/integration/test-results
|
|
if-no-files-found: ignore
|
|
retention-days: 7
|
|
|
|
- name: Docker Compose Diagnostics
|
|
if: failure() && hashFiles('docker-compose.yml') != ''
|
|
run: |
|
|
read -r -a compose_services <<< "$COMPOSE_SERVICES"
|
|
docker compose ps --all || true
|
|
docker compose logs --no-color "${compose_services[@]}" || true
|
|
|
|
- name: Stop Docker Containers
|
|
if: always() && hashFiles('docker-compose.yml') != ''
|
|
run: docker compose down --volumes --remove-orphans
|
|
adapter-integration:
|
|
name: ${{ matrix.packages }} Integration Test
|
|
runs-on: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'better-auth/better-auth' || github.event_name != 'pull_request' && github.repository == 'better-auth/better-auth') && 'starsling-ubuntu-26.04' || 'ubuntu-24.04' }}
|
|
timeout-minutes: 30
|
|
permissions:
|
|
contents: read
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- packages: "@better-auth-test/adapter-factory"
|
|
compose_services: ""
|
|
- packages: "@better-auth-test/drizzle-adapter"
|
|
compose_services: "postgres mysql"
|
|
- packages: "@better-auth-test/drizzle-v2-relations-adapter"
|
|
compose_services: "postgres mysql"
|
|
- packages: "@better-auth-test/kysely-prisma-adapter"
|
|
compose_services: "postgres-kysely mysql-kysely postgres-kysely2 mssql"
|
|
- packages: "@better-auth-test/memory-adapter"
|
|
compose_services: ""
|
|
- packages: "@better-auth-test/mongo-adapter"
|
|
compose_services: "mongodb"
|
|
- packages: "@better-auth-test/prisma-adapter"
|
|
compose_services: "postgres-prisma mysql-prisma"
|
|
env:
|
|
COMPOSE_SERVICES: ${{ matrix.compose_services }}
|
|
FILTER: ${{ matrix.packages }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Cache turbo build setup
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
with:
|
|
path: .turbo
|
|
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-turbo-
|
|
|
|
- uses: better-auth/shared-workflows/.github/actions/setup-pnpm@08e5520e7a829b03bee1152913682b67d2ba44b1
|
|
|
|
- name: Reset Docker Containers
|
|
run: docker compose down --volumes --remove-orphans
|
|
|
|
- name: Build Adapter Dependencies
|
|
run: pnpm exec turbo run build --filter="$FILTER..."
|
|
|
|
- name: Start Docker Containers
|
|
if: matrix.compose_services != ''
|
|
run: |
|
|
read -r -a compose_services <<< "$COMPOSE_SERVICES"
|
|
for startup_attempt in 1 2; do
|
|
if docker compose up -d --wait --wait-timeout 60 "${compose_services[@]}"; then
|
|
exit 0
|
|
fi
|
|
|
|
if [[ "$startup_attempt" -eq 2 ]]; then
|
|
exit 1
|
|
fi
|
|
|
|
echo "Container startup failed; resetting and retrying once."
|
|
docker compose ps --all || true
|
|
docker compose logs --no-color "${compose_services[@]}" || true
|
|
if ! docker compose down --volumes --remove-orphans; then
|
|
echo "::warning::Container cleanup failed; retrying startup with remaining resources."
|
|
fi
|
|
done
|
|
|
|
- name: Adapter Integration
|
|
run: pnpm e2e:integration --filter="$FILTER"
|
|
|
|
- name: Docker Compose Diagnostics
|
|
if: failure() && hashFiles('docker-compose.yml') != '' && matrix.compose_services != ''
|
|
run: |
|
|
read -r -a compose_services <<< "$COMPOSE_SERVICES"
|
|
docker compose ps --all || true
|
|
docker compose logs --no-color "${compose_services[@]}" || true
|
|
|
|
# Capture container exit and OOM state without masking the test failure.
|
|
# cspell:ignore pids Pids
|
|
for compose_service in "${compose_services[@]}"; do
|
|
container_id="$(docker compose ps --all --quiet "$compose_service")"
|
|
if [[ -n "$container_id" ]]; then
|
|
docker inspect --format 'name={{.Name}} status={{.State.Status}} exit={{.State.ExitCode}} oom={{.State.OOMKilled}} error={{.State.Error}}' "$container_id" || true
|
|
docker inspect --format 'name={{.Name}} pids_limit={{.HostConfig.PidsLimit}} memory_limit={{.HostConfig.Memory}} memory_swap={{.HostConfig.MemorySwap}}' "$container_id" || true
|
|
image_id="$(docker inspect --format '{{.Image}}' "$container_id" || true)"
|
|
if [[ -n "$image_id" ]]; then
|
|
docker image inspect --format 'image_id={{.Id}} repo_digests={{json .RepoDigests}}' "$image_id" || true
|
|
fi
|
|
fi
|
|
done
|
|
|
|
- name: Stop Docker Containers
|
|
if: always() && hashFiles('docker-compose.yml') != ''
|
|
run: docker compose down --volumes --remove-orphans
|
|
|
|
e2e:
|
|
runs-on: ubuntu-latest
|
|
needs: [smoke, integration, adapter-integration]
|
|
if: always()
|
|
steps:
|
|
- uses: re-actors/alls-green@b5b5b37504aa4183270bd3d855c52a67f212be35 # v1.3.0
|
|
with:
|
|
jobs: ${{ toJSON(needs) }}
|