Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ inputs:
required: false
default: "false" # We don't want to use the cache. It causes false passes of CI when updating actions and workflows.

install-playwright:
description: "Install the Playwright chromium browser (used by the GXT browser-test workflows). Default off so the many non-browser jobs are unaffected."
required: false
default: "false"

runs:
using: "composite"
steps:
Expand Down Expand Up @@ -44,3 +49,8 @@ runs:
env:
INSTALL_OPTIONS: ${{ fromJSON('{"false":"--no-lockfile", "true":"--frozen-lockfile"}')[inputs.use_lockfile] }}
shell: bash

- name: Install Playwright browsers
if: ${{ inputs.install-playwright == 'true' }}
run: pnpm exec playwright install --with-deps chromium
shell: bash
12 changes: 12 additions & 0 deletions .github/workflows/ci-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ jobs:
use_lockfile: "false"
- name: build
run: pnpm build
- name: build gxt package
if: contains(matrix.name, 'emberSourceGxt')
run: node scripts/build-gxt-package.mjs
- name: install playwright chromium (gxt boot smoke)
if: contains(matrix.name, 'emberSourceGxt')
run: npx playwright install --with-deps chromium
- name: test
working-directory: smoke-tests/scenarios
run: |
Expand All @@ -218,6 +224,12 @@ jobs:
use_lockfile: "false"
- name: build
run: pnpm build
- name: build gxt package
if: contains(matrix.name, 'emberSourceGxt')
run: node scripts/build-gxt-package.mjs
- name: install playwright chromium (gxt boot smoke)
if: contains(matrix.name, 'emberSourceGxt')
run: npx playwright install --with-deps chromium
- name: test
env:
OVERRIDE_DEPRECATION_VERSION: "15.0.0"
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/gxt-dual-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: GXT dual-build matrix

on:
push:
branches:
- master
- main
pull_request:

permissions:
contents: read

jobs:
build:
name: Build ${{ matrix.backend }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
backend: [classic, gxt, gxt-native]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup
- name: Build (${{ matrix.backend }})
run: |
rm -rf dist
if [ "${{ matrix.backend }}" = "gxt" ]; then
EMBER_RENDER_BACKEND=gxt npx rollup --config rollup.config.mjs
elif [ "${{ matrix.backend }}" = "gxt-native" ]; then
EMBER_RENDER_BACKEND=gxt-native npx rollup --config rollup.config.mjs
else
npx rollup --config rollup.config.mjs
fi
- name: Bundle size check (${{ matrix.backend }})
run: node scripts/bundle-size-check.mjs ${{ matrix.backend }}
- name: Assert the native dist is VM-free (gxt-native)
if: matrix.backend == 'gxt-native'
run: node scripts/assert-native-dist.mjs --dist dist
- name: Upload dist artifact
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: dist-${{ matrix.backend }}
path: dist/prod/packages/
if-no-files-found: warn
153 changes: 153 additions & 0 deletions .github/workflows/gxt-full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: GXT Full (nightly)

on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:

permissions:
contents: read

# The suite runs in 5 shards in parallel (runner.mjs --shard i/5: every 5th
# module of the sorted list). `GXT full suite` merges them into the
# gxt-summary.json / gxt-last-run.json of one unsharded run and gates that:
# its `gxt-full-run` and `gxt-candidate-baseline` artifacts are the same files
# an unsharded run uploads.
jobs:
shard:
name: GXT full suite shard ${{ matrix.shard }}/5
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup
with:
install-playwright: 'true'
# runner.mjs exits 1 on any failing test, known reds included, so the
# verdict comes from baseline-gate.mjs: no test of the shard's modules
# red that the baseline lists green, no timeout or harness error. That
# every baseline module ran is checked on the merged run.
- name: Run GXT full suite shard ${{ matrix.shard }}/5 vs baseline
env:
GXT_MODE: 'true'
SHARD: ${{ matrix.shard }}/5
run: |
status=0
node scripts/gxt-test-runner/runner.mjs \
--full \
--shard "$SHARD" \
--auto-serve \
--url http://localhost:5180/ \
--baseline test-results/gxt-baseline.json || status=$?
echo "$status" > test-results/gxt-runner-exit.txt
node scripts/gxt-test-runner/baseline-gate.mjs \
--baseline test-results/gxt-baseline.json \
--subset \
--runner-exit "$status"
- name: Upload shard run artifacts
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: gxt-full-run-shard-${{ matrix.shard }}
path: |
test-results/gxt-summary.json
test-results/gxt-last-run.json
test-results/gxt-runner-exit.txt
if-no-files-found: ignore

gxt-full:
name: GXT full suite
needs: shard
# Also after a failed shard: the merged gate then names every regression.
# The job fails whenever a shard failed.
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: '20'
package-manager-cache: false
- name: Download shard run artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: gxt-full-run-shard-*
path: shard-runs
# Fails when a shard left no artifact (it never got to run the suite).
- name: Merge the shard runs
run: |
node scripts/gxt-test-runner/merge-runs.mjs \
--shards 5 \
--out-dir test-results \
shard-runs/gxt-full-run-shard-*
# The unsharded verdict: no regressions, timeouts or harness errors, and
# every baseline module ran in some shard.
- name: Gate the merged GXT full suite vs baseline
id: gxt-run
run: |
node scripts/gxt-test-runner/baseline-gate.mjs \
--baseline test-results/gxt-baseline.json \
--runner-exit "$(cat test-results/gxt-runner-exit.txt || echo unknown)"
- name: Fail when a shard failed
if: ${{ needs.shard.result != 'success' }}
env:
SHARD_RESULT: ${{ needs.shard.result }}
run: |
echo "::error::A GXT full suite shard did not succeed (result: $SHARD_RESULT)."
exit 1
- name: Upload run artifacts
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: gxt-full-run
path: |
test-results/gxt-summary.json
test-results/gxt-last-run.json
if-no-files-found: ignore
- name: Upload candidate baseline
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: gxt-candidate-baseline
path: test-results/gxt-summary.json
if-no-files-found: ignore
- name: File regression issue
if: failure() && steps.gxt-run.outcome == 'failure'
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
with:
script: |
const title = `GXT nightly regression on ${context.sha.substring(0,7)}`;
const body = [
'The nightly GXT full-suite run failed against',
'`test-results/gxt-baseline.json`.',
'',
`- commit: ${context.sha}`,
`- run: https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
'',
'Download the `gxt-full-run` artifact and diff it:',
'',
'```',
'node scripts/gxt-test-runner/diff.mjs \\',
' test-results/gxt-baseline.json \\',
' gxt-summary.json',
'```',
].join('\n');
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title,
body,
labels: ['gxt', 'regression', 'nightly'],
});
Loading