ci: [CI-01] split playback engines from browser consumers

This commit is contained in:
Harvey Zhao committed 2026-09-15 04:18:18 +08:00
1 parent 92b04d75c0
commit 4a9ef16b16
16 files changed
+1031 -74

No files matched your search

+79 -19
View File
@@ -69,8 +69,8 @@ jobs:
include-hidden-files: true
retention-days: 14
if-no-files-found: warn
browser-smoke:
name: Browser playback (${{ matrix.os }})
browser-consumers:
name: Browser consumers (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
env:
@@ -135,19 +135,6 @@ jobs:
run: yarn test:react-consumer 2>&1 | tee refactor/.cache/ci/react-consumer.log
- name: Verify Vue installed consumers
run: yarn test:vue-consumer 2>&1 | tee refactor/.cache/ci/vue-consumer.log
- name: Prepare installed browser plugin packages
# Node/framework consumers above retain their two-package fixture scope.
# These extra installed packages are required by the browser helpers.
# Other ecosystem installation/SDK gates remain tracked by CI-01.
run: |
yarn test:package --browser 2>&1 | tee refactor/.cache/ci/browser-packages.log
node --input-type=module -e 'import fs from "node:fs"; const { output } = JSON.parse(fs.readFileSync("refactor/.cache/packages/latest.json")); fs.appendFileSync(process.env.GITHUB_ENV, `ARTPLAYER_BROWSER_ARTIFACTS=${output}/browser-artifacts.json\n`);'
- name: Run all source browser checks
if: ${{ !cancelled() }}
run: yarn test:browser:source 2>&1 | tee refactor/.cache/ci/browser-source.log
- name: Run installed browser checks
if: ${{ !cancelled() }}
run: yarn test:browser:installed 2>&1 | tee refactor/.cache/ci/browser-installed.log
- name: Verify iframe cached history and interrupted navigation
run: yarn test:iframe-history 2>&1 | tee refactor/.cache/ci/iframe-history.log
- name: Compare installed performance and verify resource cleanup
@@ -156,12 +143,9 @@ jobs:
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: browser-smoke-${{ matrix.os }}-${{ github.run_id }}-${{ github.run_attempt }}
name: browser-consumers-${{ matrix.os }}-${{ github.run_id }}-${{ github.run_attempt }}
path: |
refactor/.cache/ci/
refactor/.cache/browser/
refactor/.cache/browser-source/
refactor/.cache/browser-installed/
refactor/.cache/iframe-history/
refactor/.cache/react-consumer-*/
refactor/.cache/vue-consumer-*/
@@ -185,6 +169,81 @@ jobs:
- ubuntu-latest
- windows-latest
- macos-latest
browser-smoke:
name: Browser playback (${{ matrix.os }}, ${{ matrix.browser }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
env:
CI: true
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .node-version
package-manager-cache: false
- name: Record source and cache inputs
id: context
run: node scripts/ci-context.mjs
- name: Cache locked Yarn downloads
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5 ref verified 2026-09-13; node24
with:
path: ${{ steps.context.outputs.yarn_cache }}
key: yarn-${{ runner.os }}-${{ runner.arch }}-node-${{ steps.context.outputs.node }}-yarn-${{ steps.context.outputs.yarn }}-${{ github.ref }}-${{ hashFiles('yarn.lock') }}
- name: Install the pinned package manager and dependencies
run: |
npm install --global --force yarn@1.22.22 2>&1 | tee refactor/.cache/ci/toolchain-install.log
yarn install --frozen-lockfile --non-interactive 2>&1 | tee refactor/.cache/ci/install.log
- name: Cache versioned browser downloads
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5 ref verified 2026-09-13; node24
with:
path: ${{ steps.context.outputs.browser_cache }}
key: playwright-${{ runner.os }}-${{ runner.arch }}-node-${{ steps.context.outputs.node }}-yarn-${{ steps.context.outputs.yarn }}-${{ github.ref }}-${{ hashFiles('yarn.lock') }}-${{ steps.context.outputs.playwright }}
- name: Install test browsers
run: yarn test:browser:install --with-deps 2>&1 | tee refactor/.cache/ci/browser-install.log
- name: Prepare installed browser plugin packages
# Each engine builds and freezes its own complete installed browser roster.
# Other ecosystem installation/SDK gates remain tracked by CI-01.
run: |
yarn test:package --browser 2>&1 | tee refactor/.cache/ci/browser-packages.log
node --input-type=module -e 'import fs from "node:fs"; const { output } = JSON.parse(fs.readFileSync("refactor/.cache/packages/latest.json")); fs.appendFileSync(process.env.GITHUB_ENV, `ARTPLAYER_BROWSER_ARTIFACTS=${output}/browser-artifacts.json\n`);'
- name: Run all source browser checks
if: ${{ !cancelled() }}
run: yarn test:browser:source --project=${{ matrix.browser }} 2>&1 | tee refactor/.cache/ci/browser-source.log
- name: Run installed browser checks
if: ${{ !cancelled() }}
run: yarn test:browser:installed --project=${{ matrix.browser }} 2>&1 | tee refactor/.cache/ci/browser-installed.log
- name: Upload browser evidence
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: browser-smoke-${{ matrix.os }}-${{ matrix.browser }}-${{ github.run_id }}-${{ github.run_attempt }}
path: |
refactor/.cache/ci/
refactor/.cache/browser-source/
refactor/.cache/browser-installed/
refactor/.cache/packages/latest.json
refactor/.cache/packages/run-*/*.json
refactor/.cache/packages/run-*/*.log
refactor/.cache/packages/run-*/*.tgz
refactor/.cache/packages/run-*/artifacts/
include-hidden-files: true
retention-days: 14
if-no-files-found: warn
defaults:
run:
shell: bash
strategy:
fail-fast: false
max-parallel: 6
matrix:
browser: [chromium, firefox, webkit]
os:
- ubuntu-latest
- windows-latest
- macos-latest
checks:
name: Checks and build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
@@ -279,6 +338,7 @@ jobs:
- checks
- coverage
- browser-smoke
- browser-consumers
runs-on: ubuntu-latest
timeout-minutes: 5
steps: