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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/build-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,8 @@ jobs:
- name: Set up env
run: cat packages/host/config/${{ inputs.environment }}.env >> $GITHUB_ENV

- name: Build boxel-icons
run: pnpm build
working-directory: packages/boxel-icons

- name: Build boxel-ui
run: pnpm build
working-directory: packages/boxel-ui/addon
- name: Build boxel-icons and boxel-ui
run: mise run build:ui

- name: Build host
run: pnpm deploy:boxel-host build-only --verbose
Expand Down
33 changes: 2 additions & 31 deletions .github/workflows/ci-host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,9 @@ jobs:
shopt -s dotglob
cp -a .test-web-assets-artifact/. ./

- name: Serve boxel-icons
run: pnpm serve &> /tmp/icon-server.log &
working-directory: packages/boxel-icons

- name: Disable TCP/UDP network offloading
run: sudo ethtool -K eth0 tx off rx off
- name: Serve host dist (test assets) for realm server
uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # 1.0.7
with:
run: pnpm serve:dist &
working-directory: packages/host
wait-for: 3m
wait-on: http-get://localhost:4200
- name: Start realm servers
- name: Start test services (icons + host dist + realm servers)
run: pnpm start:services-for-host-tests | tee -a /tmp/server.log &
working-directory: packages/realm-server
- name: Create realm users
Expand Down Expand Up @@ -164,23 +153,12 @@ jobs:
shopt -s dotglob
cp -a .test-web-assets-artifact/. ./

- name: Serve boxel-icons
run: pnpm serve &> /tmp/icon-server.log &
working-directory: packages/boxel-icons

# this is to hopefully address the CI network flakiness that we
# occasionally see in host tests.
# https://github.com/actions/runner-images/issues/1187#issuecomment-686735760
- name: Disable TCP/UDP network offloading
run: sudo ethtool -K eth0 tx off rx off
- name: Serve host dist (test assets) for realm server
uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # 1.0.7
with:
run: pnpm serve:dist &
working-directory: packages/host
wait-for: 3m
wait-on: http-get://localhost:4200
- name: Start realm servers
- name: Start test services (icons + host dist + realm servers)
run: pnpm start:services-for-host-tests | tee -a /tmp/server.log &
working-directory: packages/realm-server
env:
Expand Down Expand Up @@ -294,13 +272,6 @@ jobs:
name: testem-log-${{ matrix.shardIndex }}
path: junit/host-testem.log
retention-days: 30
- name: Upload icon server log
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # 4.6.1
if: ${{ !cancelled() }}
with:
name: icon-server-log-${{ matrix.shardIndex }}
path: /tmp/icon-server.log
retention-days: 30

host-percy-finalize:
name: Finalise Percy
Expand Down
48 changes: 9 additions & 39 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,8 @@ jobs:
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./.github/actions/init
- name: Build boxel-icons
run: pnpm build
working-directory: packages/boxel-icons
- name: Build boxel-ui
run: pnpm build
working-directory: packages/boxel-ui/addon
- name: Build boxel-icons and boxel-ui
run: mise run build:ui
- name: Run test suite
run: pnpm test
working-directory: packages/boxel-ui/test-app
Expand Down Expand Up @@ -318,14 +314,7 @@ jobs:
- name: Install Playwright Browsers
run: pnpm exec playwright install
working-directory: packages/matrix
- name: Serve host dist (test assets) for realm server
uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # 1.0.7
with:
run: pnpm serve:dist &
working-directory: packages/host
wait-for: 3m
wait-on: http-get://localhost:4200
- name: Start realm servers
- name: Start test services (icons + host dist + base realm)
run: MATRIX_REGISTRATION_SHARED_SECRET='xxxx' pnpm start:services-for-matrix-tests | tee -a /tmp/server.log &
working-directory: packages/realm-server
- name: Run Playwright tests
Expand Down Expand Up @@ -570,18 +559,8 @@ jobs:
run: |
shopt -s dotglob
cp -a .test-web-assets-artifact/. ./
- name: Serve boxel-icons
run: pnpm serve &
working-directory: packages/boxel-icons
- name: Serve host dist (test assets) for realm server
uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # 1.0.7
with:
run: pnpm serve:dist &
working-directory: packages/host
wait-for: 3m
wait-on: http-get://localhost:4200
- name: Start realm servers
run: pnpm start:skip-optional-realms | tee -a /tmp/server.log &
- name: Start test services (icons + host dist + realm servers)
run: pnpm start:services-for-realm-server-tests | tee -a /tmp/server.log &
working-directory: packages/realm-server
- name: create realm users
run: pnpm register-realm-users
Expand Down Expand Up @@ -678,20 +657,12 @@ jobs:
- name: Run Node tests
run: pnpm test:node
working-directory: packages/software-factory
- name: Serve host dist (test assets)
- name: Serve test assets (icons + host dist)
uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # 1.0.7
with:
run: pnpm serve:dist &
working-directory: packages/host
run: mise run ci:serve-test-assets &
wait-for: 3m
wait-on: http-get://localhost:4200
- name: Serve boxel-icons
uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # 1.0.7
with:
run: pnpm serve &
working-directory: packages/boxel-icons
wait-for: 3m
wait-on: http-get://localhost:4206/@cardstack/boxel-icons/v1/icons/code.js
- name: Run Playwright tests
run: pnpm test:playwright
working-directory: packages/software-factory
Expand Down Expand Up @@ -776,11 +747,10 @@ jobs:
- name: Build workspace-sync-cli
run: pnpm build
working-directory: packages/workspace-sync-cli
- name: Serve host dist (test assets)
- name: Serve test assets (icons + host dist)
uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # 1.0.7
with:
run: pnpm serve:dist &
working-directory: packages/host
run: mise run ci:serve-test-assets &
wait-for: 3m
wait-on: http-get://localhost:4200
- name: Start PostgreSQL for tests
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/deploy-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,8 @@ jobs:
echo "unrecognized environment"
exit 1;
fi
- name: Build boxel-icons
run: pnpm build
working-directory: packages/boxel-icons
- name: Build boxel-ui addon
run: pnpm build
working-directory: packages/boxel-ui/addon
- name: Build boxel-icons and boxel-ui
run: mise run build:ui

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # 4.1.0
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/manual-vscode-boxel-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,8 @@ jobs:
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./.github/actions/init
- name: Build boxel-icons
run: pnpm build
working-directory: packages/boxel-icons
- name: Build boxel-ui
run: pnpm build
working-directory: packages/boxel-ui/addon
- name: Build boxel-icons and boxel-ui
run: mise run build:ui
- name: Package
run: pnpm vscode:package
working-directory: packages/vscode-boxel-tools
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/test-web-assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,9 @@ jobs:
packages/host/dist
.ci/test-web-assets/manifest.json

- name: Build boxel-icons
- name: Build boxel-icons and boxel-ui
if: steps.restore.outputs.cache-hit != 'true'
run: pnpm build
working-directory: packages/boxel-icons

- name: Build boxel-ui
if: steps.restore.outputs.cache-hit != 'true'
run: pnpm build
working-directory: packages/boxel-ui/addon
run: mise run build:ui

- name: Build host dist (test assets)
if: steps.restore.outputs.cache-hit != 'true'
Expand Down
7 changes: 7 additions & 0 deletions mise-tasks/build/ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
#MISE description="Build boxel-icons and boxel-ui (in dependency order)"

set -eu

pnpm --dir packages/boxel-icons build
pnpm --dir packages/boxel-ui/addon build
12 changes: 12 additions & 0 deletions mise-tasks/ci/serve-test-assets
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
#MISE description="Serve test assets (boxel-icons + host dist) with readiness checks"
#MISE dir="packages/realm-server"

# Start both static servers and wait for them to be ready.
# Useful for CI jobs that need icons + host-dist but not the full realm server stack.

WAIT_ON_TIMEOUT=180000 NODE_NO_WARNINGS=1 \
start-server-and-test \
'run-p -ln start:icons start:host-dist' \
"${ICONS_URL}|${HOST_URL}" \
'wait'
4 changes: 2 additions & 2 deletions mise-tasks/test-services-host
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ WAIT_ON_TIMEOUT=900000 \
LOG_LEVELS="$HOST_TEST_LOG_LEVELS" \
NODE_NO_WARNINGS=1 \
start-server-and-test \
'run-p -ln start:pg start:prerender-dev start:prerender-manager-dev start:matrix start:smtp start:worker-development start:development' \
"${BASE_REALM_READY}|${MATRIX_URL_VAL}|http://localhost:5001|${ICONS_URL}" \
'run-p -ln start:icons start:host-dist start:pg start:prerender-dev start:prerender-manager-dev start:matrix start:smtp start:worker-development start:development' \
"${BASE_REALM_READY}|${MATRIX_URL_VAL}|http://localhost:5001|${ICONS_URL}|${HOST_URL}" \
'run-p -ln start:worker-test start:test-realms' \
"${NODE_TEST_REALM_READY}" \
'wait'
4 changes: 2 additions & 2 deletions mise-tasks/test-services-matrix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ BASE_REALM_READY="http-get://${REALM_BASE_URL#http://}/base/${READY_PATH}"

WAIT_ON_TIMEOUT=600000 NODE_NO_WARNINGS=1 SKIP_SUBMISSION=true \
start-server-and-test \
'run-p -ln start:pg start:icons start:prerender-dev start:prerender-manager-dev start:worker-base start:base' \
"${BASE_REALM_READY}|${ICONS_URL}" \
'run-p -ln start:pg start:icons start:host-dist start:prerender-dev start:prerender-manager-dev start:worker-base start:base' \
"${BASE_REALM_READY}|${ICONS_URL}|${HOST_URL}" \
'wait'
20 changes: 20 additions & 0 deletions mise-tasks/test-services-realm-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
#MISE description="Start services for realm-server test suite (icons + host-dist + dev-minimal services)"
#MISE dir="packages/realm-server"

READY_PATH="_readiness-check?acceptHeader=application%2Fvnd.api%2Bjson"
BASE_REALM_READY="http-get://${REALM_BASE_URL#http://}/base/${READY_PATH}"
NODE_TEST_REALM_READY="http-get://${REALM_TEST_URL#http://}/node-test/${READY_PATH}"

WAIT_ON_TIMEOUT=900000 \
SKIP_EXPERIMENTS=true \
SKIP_CATALOG=true \
SKIP_BOXEL_HOMEPAGE=true \
SKIP_SUBMISSION=true \
NODE_NO_WARNINGS=1 \
start-server-and-test \
'run-p -ln start:icons start:host-dist start:pg start:prerender-dev start:prerender-manager-dev start:matrix start:smtp start:worker-development start:development' \
"${BASE_REALM_READY}|http-get://${REALM_BASE_URL#http://}/software-factory/${READY_PATH}|${MATRIX_URL_VAL}|http://localhost:5001|${ICONS_URL}|${HOST_URL}" \
'run-p -ln start:worker-test start:test-realms' \
"${NODE_TEST_REALM_READY}" \
'wait'
2 changes: 2 additions & 0 deletions packages/realm-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"start:matrix": "./scripts/start-matrix.sh",
"start:smtp": "cd ../matrix && pnpm assert-smtp-running",
"start:icons": "mise run services:icons",
"start:host-dist": "pnpm --dir=../host serve:dist",
"start:pg": "./scripts/start-pg.sh",
"stop:pg": "./scripts/stop-pg.sh",
"test:wait-for-servers": "WAIT_ON_TIMEOUT=900000 NODE_NO_WARNINGS=1 start-server-and-test 'pnpm run wait' 'http-get://localhost:4201/base/_readiness-check?acceptHeader=application%2Fvnd.api%2Bjson' 'pnpm run wait' 'http-get://localhost:4202/node-test/_readiness-check?acceptHeader=application%2Fvnd.api%2Bjson|http://localhost:8008|http://localhost:5001' 'test-module'",
Expand Down Expand Up @@ -125,6 +126,7 @@
"start:worker-test": "mise run services:worker-test",
"start:worker-staging": "./scripts/start-worker-staging.sh",
"start:worker-production": "./scripts/start-worker-production.sh",
"start:services-for-realm-server-tests": "mise run test-services-realm-server",
"start:services-for-matrix-tests": "mise run test-services-matrix",
"wait": "sleep 10000000",
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"",
Expand Down
Loading