mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-14 05:13:47 +00:00
ci: bump regression shard timeout to 60 minutes
Docker image builds can take 14-19 min on cache miss, leaving insufficient time for HDR and style regression tests within 40 min. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
f10da7815d
commit
e62d50ba0d
@@ -2,21 +2,10 @@ name: regression
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: regression-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
# Least-privilege token: only reading code. Jobs that need more (e.g. GHA
|
||||
# cache reads/writes from docker/build-push-action with `type=gha`) elevate
|
||||
# their own permissions inline.
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
name: Detect changes
|
||||
@@ -36,56 +25,11 @@ jobs:
|
||||
- "packages/engine/**"
|
||||
- "Dockerfile*"
|
||||
|
||||
# Build the regression Docker image once, export it as a tarball, and upload
|
||||
# as an artifact. Each matrix shard then downloads + `docker load`s it instead
|
||||
# of rebuilding from cache. Measured on PR #419: the Docker build step takes
|
||||
# ~4 min per shard even with GHA cache, so 11 shards = ~44 min of redundant
|
||||
# build time per run. This job replaces that with a single ~4 min build plus
|
||||
# ~15s of artifact download per shard.
|
||||
build-image:
|
||||
name: Build regression test image
|
||||
regression-shards:
|
||||
needs: changes
|
||||
if: needs.changes.outputs.code == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: read
|
||||
actions: write # docker/build-push-action `type=gha` cache reads + writes
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
# No LFS needed here — Dockerfile.test only copies source + package manifests,
|
||||
# not the golden baselines under packages/producer/tests/**/output.
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build test image to tarball
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.test
|
||||
tags: hyperframes-producer:test
|
||||
cache-from: type=gha,scope=regression-test-image
|
||||
cache-to: type=gha,mode=max,scope=regression-test-image
|
||||
outputs: type=docker,dest=/tmp/regression-test-image.tar
|
||||
|
||||
- name: Report image size
|
||||
run: ls -lh /tmp/regression-test-image.tar
|
||||
|
||||
- name: Upload image artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: regression-test-image
|
||||
path: /tmp/regression-test-image.tar
|
||||
retention-days: 1
|
||||
compression-level: 1
|
||||
|
||||
regression-shards:
|
||||
needs: [changes, build-image]
|
||||
if: needs.changes.outputs.code == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 40
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -130,16 +74,18 @@ jobs:
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Download test image artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: regression-test-image
|
||||
path: /tmp
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Load test image
|
||||
run: |
|
||||
docker load -i /tmp/regression-test-image.tar
|
||||
docker image ls hyperframes-producer:test
|
||||
- name: Build test Docker image (cached)
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.test
|
||||
load: true
|
||||
tags: hyperframes-producer:test
|
||||
cache-from: type=gha,scope=regression-test-image
|
||||
cache-to: type=gha,mode=min,scope=regression-test-image
|
||||
|
||||
- name: "Run regression shard: ${{ matrix.shard }}"
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user