d94eacd485
Bumps the github-actions group with 14 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `7.0.0` | `7.0.1` | | [docker/login-action](https://github.com/docker/login-action) | `4.2.0` | `4.6.0` | | [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) | `4.1.0` | `4.2.2` | | [actions/setup-node](https://github.com/actions/setup-node) | `6.4.0` | `7.0.0` | | [changesets/action](https://github.com/changesets/action) | `1.9.0` | `2.1.0` | | [anthropics/claude-code-action](https://github.com/anthropics/claude-code-action) | `1.0.157` | `1.0.192` | | [WarpBuilds/setup-node](https://github.com/warpbuilds/setup-node) | `6.3.0` | `7.0.0` | | [dorny/paths-filter](https://github.com/dorny/paths-filter) | `4.0.1` | `4.0.3` | | [softprops/action-gh-release](https://github.com/softprops/action-gh-release) | `3.0.1` | `3.0.2` | | [denoland/setup-deno](https://github.com/denoland/setup-deno) | `2.0.4` | `2.0.5` | | [WarpBuilds/cache](https://github.com/warpbuilds/cache) | `1.4.13` | `2.0.0` | | [mitchellh/vouch/action/check-pr](https://github.com/mitchellh/vouch) | `1.4.2` | `1.5.0` | | [mitchellh/vouch/action/manage-by-issue](https://github.com/mitchellh/vouch) | `1.4.2` | `1.5.0` | | [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) | `0.5.7` | `0.6.2` | Updates `actions/checkout` from 7.0.0 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/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0...3d3c42e5aac5ba805825da76410c181273ba90b1) Updates `docker/login-action` from 4.2.0 to 4.6.0 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/650006c6eb7dba73a995cc03b0b2d7f5ca915bee...dbcb813823bdd20940b903addbd779551569679f) Updates `actions/attest-build-provenance` from 4.1.0 to 4.2.2 - [Release notes](https://github.com/actions/attest-build-provenance/releases) - [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md) - [Commits](https://github.com/actions/attest-build-provenance/compare/a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32...4d101475d8b20a2381f78447822ac1eab6504dd8) Updates `actions/setup-node` from 6.4.0 to 7.0.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e...820762786026740c76f36085b0efc47a31fe5020) Updates `changesets/action` from 1.9.0 to 2.1.0 - [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...198f833dd7d863100ea6e28967bc9a9fdefadb0a) Updates `anthropics/claude-code-action` from 1.0.157 to 1.0.192 - [Release notes](https://github.com/anthropics/claude-code-action/releases) - [Commits](https://github.com/anthropics/claude-code-action/compare/428971d2ecd6e3a7cb0ee0da2a3a8b33fdb3678d...e63208cb983318a44e3f945e959ef894b707dcfa) Updates `WarpBuilds/setup-node` from 6.3.0 to 7.0.0 - [Release notes](https://github.com/warpbuilds/setup-node/releases) - [Commits](https://github.com/warpbuilds/setup-node/compare/bc639b444d583175926b588962199c247d23e8d3...2867cf8f859d73439e1ad18b542617e5a29f0f10) Updates `dorny/paths-filter` from 4.0.1 to 4.0.3 - [Release notes](https://github.com/dorny/paths-filter/releases) - [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md) - [Commits](https://github.com/dorny/paths-filter/compare/fbd0ab8f3e69293af611ebaee6363fc25e6d187d...ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d) Updates `softprops/action-gh-release` from 3.0.1 to 3.0.2 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/718ea10b132b3b2eba29c1007bb80653f286566b...3d0d9888cb7fd7b750713d6e236d1fcb99157228) 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 `WarpBuilds/cache` from 1.4.13 to 2.0.0 - [Release notes](https://github.com/warpbuilds/cache/releases) - [Changelog](https://github.com/WarpBuilds/cache/blob/main/RELEASES.md) - [Commits](https://github.com/warpbuilds/cache/compare/40f3443ae7b70e568d6e2070ea897f3df94d7553...dad44e2487e9dc889ad6e6bd198e77bb2d828eee) Updates `mitchellh/vouch/action/check-pr` from 1.4.2 to 1.5.0 - [Release notes](https://github.com/mitchellh/vouch/releases) - [Commits](https://github.com/mitchellh/vouch/compare/c6d80ead49839655b61b422700b7a3bc9d0804a9...d66fa29a64600490892131ad87597c30c91fcac4) Updates `mitchellh/vouch/action/manage-by-issue` from 1.4.2 to 1.5.0 - [Release notes](https://github.com/mitchellh/vouch/releases) - [Commits](https://github.com/mitchellh/vouch/compare/c6d80ead49839655b61b422700b7a3bc9d0804a9...d66fa29a64600490892131ad87597c30c91fcac4) Updates `zizmorcore/zizmor-action` from 0.5.7 to 0.6.2 - [Release notes](https://github.com/zizmorcore/zizmor-action/releases) - [Commits](https://github.com/zizmorcore/zizmor-action/compare/192e21d79ab29983730a13d1382995c2307fbcaa...3dc1ecc9bcb9e94e9b2c709687979e1298497054) --- updated-dependencies: - dependency-name: actions/attest-build-provenance dependency-version: 4.2.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/setup-node dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: anthropics/claude-code-action dependency-version: 1.0.191 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: changesets/action dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-major 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: docker/login-action dependency-version: 4.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: dorny/paths-filter dependency-version: 4.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: mitchellh/vouch/action/check-pr dependency-version: 1.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: mitchellh/vouch/action/manage-by-issue dependency-version: 1.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: softprops/action-gh-release dependency-version: 3.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: WarpBuilds/cache dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: WarpBuilds/setup-node dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: zizmorcore/zizmor-action dependency-version: 0.6.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
199 lines
7.0 KiB
YAML
199 lines
7.0 KiB
YAML
name: "🧪 Unit Tests: Webapp"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
workflow_call:
|
|
secrets:
|
|
DOCKERHUB_USERNAME:
|
|
required: false
|
|
DOCKERHUB_TOKEN:
|
|
required: false
|
|
|
|
jobs:
|
|
unitTests:
|
|
name: "🧪 Unit Tests: Webapp"
|
|
# Webapp test throughput is limited per-machine (one docker daemon + disk absorbing
|
|
# all the per-file Postgres/ClickHouse container spin-up), so many machines beats
|
|
# few big ones - fewer/bigger (3x32) measured slower than 10x8. The 16x (vs 8x)
|
|
# gives the fork pool the CPU headroom the 8x runners lacked.
|
|
runs-on: warp-ubuntu-latest-x64-16x
|
|
strategy:
|
|
# one flaky shard shouldn't cancel its siblings - lets us re-run only the failed shard
|
|
fail-fast: false
|
|
matrix:
|
|
shardIndex:
|
|
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
|
|
shardTotal: [24]
|
|
env:
|
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
SHARD_INDEX: ${{ matrix.shardIndex }}
|
|
SHARD_TOTAL: ${{ matrix.shardTotal }}
|
|
steps:
|
|
- name: 🔧 Disable IPv6
|
|
run: |
|
|
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
|
|
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
|
|
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
|
|
|
|
- name: 🔧 Configure docker address pool
|
|
run: |
|
|
CONFIG='{
|
|
"default-address-pools" : [
|
|
{
|
|
"base" : "172.17.0.0/12",
|
|
"size" : 20
|
|
},
|
|
{
|
|
"base" : "192.168.0.0/16",
|
|
"size" : 24
|
|
}
|
|
]
|
|
}'
|
|
mkdir -p /etc/docker
|
|
echo "$CONFIG" | sudo tee /etc/docker/daemon.json
|
|
|
|
- name: 🔧 Restart docker daemon
|
|
run: sudo systemctl restart docker
|
|
|
|
- name: ⬇️ Checkout repo
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 1
|
|
persist-credentials: false
|
|
|
|
- name: ⎔ Setup pnpm
|
|
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
|
|
with:
|
|
version: 10.33.2
|
|
|
|
- name: ⎔ Setup node
|
|
uses: WarpBuilds/setup-node@2867cf8f859d73439e1ad18b542617e5a29f0f10 # v7.0.0
|
|
with:
|
|
node-version: 24.18.0
|
|
cache: "pnpm"
|
|
|
|
# ..to avoid rate limits when pulling images
|
|
- name: 🐳 Login to DockerHub
|
|
if: ${{ env.DOCKERHUB_USERNAME }}
|
|
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: 🐳 Skipping DockerHub login (no secrets available)
|
|
if: ${{ !env.DOCKERHUB_USERNAME }}
|
|
run: echo "DockerHub login skipped because secrets are not available."
|
|
|
|
- name: 📥 Prepare deps and testcontainer images
|
|
run: |
|
|
# Pull images concurrently with dependency installation. Retry each pull because
|
|
# DockerHub registry timeouts are a recurring transient CI flake.
|
|
pull() {
|
|
for attempt in 1 2 3; do
|
|
docker pull "$1" && return 0
|
|
echo "::warning::docker pull $1 failed (attempt ${attempt}/3); retrying in 10s"
|
|
sleep 10
|
|
done
|
|
echo "::error::docker pull $1 failed after 3 attempts"
|
|
return 1
|
|
}
|
|
|
|
pull_images() {
|
|
local pids=()
|
|
local failed=0
|
|
for image in \
|
|
postgres:14 \
|
|
postgres:17 \
|
|
clickhouse/clickhouse-server:26.2.19.43-alpine@sha256:c6ad6a7eb2fb5999df3adfb8b69a0c7222c68fa9b8f6b04a088564ebbc959251 \
|
|
redis:7.2 \
|
|
testcontainers/ryuk:0.14.0 \
|
|
electricsql/electric:1.2.4@sha256:20da3d0b0e74926c5623392db67fd56698b9e374c4aeb6cb5cadeb8fea171c36 \
|
|
minio/minio:latest
|
|
do
|
|
pull "$image" &
|
|
pids+=("$!")
|
|
done
|
|
for pid in "${pids[@]}"; do
|
|
if ! wait "$pid"; then
|
|
failed=1
|
|
fi
|
|
done
|
|
return "$failed"
|
|
}
|
|
|
|
echo "Installing dependencies and pre-pulling Docker images..."
|
|
pull_images &
|
|
pull_pid=$!
|
|
install_status=0
|
|
pnpm install --frozen-lockfile || install_status=$?
|
|
pull_status=0
|
|
wait "$pull_pid" || pull_status=$?
|
|
if (( install_status != 0 || pull_status != 0 )); then
|
|
exit 1
|
|
fi
|
|
echo "Dependency install and image pre-pull complete"
|
|
|
|
- name: 📀 Generate Prisma Client
|
|
run: pnpm run generate
|
|
|
|
- name: 🧪 Run Webapp Unit Tests
|
|
run: pnpm run test:webapp --reporter=default --reporter=blob --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --passWithNoTests
|
|
env:
|
|
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres
|
|
DIRECT_URL: postgresql://postgres:postgres@localhost:5432/postgres
|
|
SESSION_SECRET: "secret"
|
|
MAGIC_LINK_SECRET: "secret"
|
|
ENCRYPTION_KEY: "dummy-encryption-keeeey-32-bytes"
|
|
DEPLOY_REGISTRY_HOST: "docker.io"
|
|
CLICKHOUSE_URL: "http://default:password@localhost:8123"
|
|
|
|
- name: Gather all reports
|
|
if: ${{ !cancelled() }}
|
|
run: |
|
|
mkdir -p .vitest-reports
|
|
find . -type f -path '*/.vitest-reports/blob-*.json' \
|
|
-exec bash -c 'src="$1"; basename=$(basename "$src"); pkg=$(dirname "$src" | sed "s|^\./||;s|/\.vitest-reports$||;s|/|_|g"); cp "$src" ".vitest-reports/${pkg}-${basename}"' _ {} \;
|
|
|
|
- name: Upload blob reports to GitHub Actions Artifacts
|
|
if: ${{ !cancelled() }}
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: webapp-blob-report-${{ matrix.shardIndex }}
|
|
path: .vitest-reports/*
|
|
include-hidden-files: true
|
|
retention-days: 1
|
|
|
|
merge-reports:
|
|
name: "📊 Merge Reports"
|
|
if: ${{ !cancelled() }}
|
|
needs: [unitTests]
|
|
runs-on: warp-ubuntu-latest-x64-2x
|
|
steps:
|
|
- name: ⬇️ Checkout repo
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 1
|
|
persist-credentials: false
|
|
|
|
- name: ⎔ Setup pnpm
|
|
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
|
|
with:
|
|
version: 10.33.2
|
|
|
|
- name: ⎔ Setup node
|
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
node-version: 24.18.0
|
|
# no cache enabled, we're not installing deps
|
|
|
|
- name: Download blob reports from GitHub Actions Artifacts
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
path: .vitest-reports
|
|
pattern: webapp-blob-report-*
|
|
merge-multiple: true
|
|
|
|
- name: Merge reports
|
|
run: pnpm dlx vitest@4.1.7 run --merge-reports --pass-with-no-tests
|