From a5472065ad2ae1b56e6f7a052d89655fc6ef3c5f Mon Sep 17 00:00:00 2001 From: nmburgan <13688219+nmburgan@users.noreply.github.com> Date: Fri, 13 Nov 2026 18:53:33 +0000 Subject: [PATCH] Run the openvox suite's server-free tests on Windows and MacOS The Windows and MacOS cells only ran the openvox-agent suite. They now also run the openvox suite in its shards, without the tests tagged server. The suite's serverless-beaker-options keep only the pre-suite steps that need no server and set Beaker's masterless option. The cells get 90 minutes, because the agent suite already takes about three times as long on these runners as on Linux. Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com> Assisted-by: Claude Opus 5.5 --- .github/workflows/beaker_acceptance.yml | 50 ++++++++++++++++--------- README.md | 13 +++++-- scripts/project-config.sh | 6 +++ scripts/project_defaults.json | 8 ++++ 4 files changed, 57 insertions(+), 20 deletions(-) diff --git a/.github/workflows/beaker_acceptance.yml b/.github/workflows/beaker_acceptance.yml index 401dd78..4fc9913 100644 --- a/.github/workflows/beaker_acceptance.yml +++ b/.github/workflows/beaker_acceptance.yml @@ -144,6 +144,8 @@ jobs: install-termini: ${{ steps.set-defaults.outputs.install_termini }} acceptance-working-dir: ${{ steps.set-defaults.outputs.acceptance_working_dir }} beaker-config: ${{ steps.set-defaults.outputs.beaker_config }} + serverless-beaker-config: ${{ steps.set-defaults.outputs.serverless_beaker_config }} + acceptance-shard-tags: ${{ steps.set-defaults.outputs.acceptance_shard_tags }} steps: - name: Checkout platform config uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -485,23 +487,26 @@ jobs: bundle exec beaker provision bundle exec beaker exec - # nested_vms has no MacOS or Windows images, so these cells run the - # openvox-agent suite, which needs no server, on GitHub-hosted runners - # of those systems with the runner itself as the agent. + # nested_vms has no MacOS or Windows images, so these cells run the tests + # that need no server on GitHub-hosted runners of those systems, with the + # runner itself as the agent. That is the whole openvox-agent suite, and the + # openvox suite without its tests tagged server. acceptance-macos: - name: MacOS Acceptance Tests (${{ matrix.runner }}) + name: MacOS Acceptance Tests (${{ matrix.host.runner }}${{ matrix.shard && format(', {0}', matrix.shard) || '' }}) needs: set-project-defaults - if: inputs.suite-name == 'openvox-agent' && !inputs.fips && inputs.openvox-agent-version != '' - runs-on: ${{ matrix.runner }} - timeout-minutes: 60 + if: (inputs.suite-name == 'openvox-agent' || inputs.suite-name == 'openvox') && !inputs.fips && inputs.openvox-agent-version != '' + runs-on: ${{ matrix.host.runner }} + timeout-minutes: 90 strategy: fail-fast: false matrix: - include: + host: - {runner: macos-15, arch: arm64, platform: osx-15-arm64} - {runner: macos-26, arch: arm64, platform: osx-26-arm64} - {runner: macos-15-intel, arch: x86_64, platform: osx-15-x86_64} - {runner: macos-26-intel, arch: x86_64, platform: osx-26-x86_64} + # One cell per runner for a suite without shard tags. + shard: ${{ fromJson(needs.set-project-defaults.outputs.acceptance-shard-tags)[0] && fromJson(needs.set-project-defaults.outputs.acceptance-shard-tags) || fromJson('[""]') }} env: ACCEPTANCE_WORKING_DIR: |- ${{ format('{0}/{1}/{2}', @@ -525,7 +530,7 @@ jobs: GCS_BUCKET: ${{ inputs.openvox-agent-pre-release-build && vars.GCS_ARTIFACTS_BUCKET || '' }} ARTIFACTS_URL: ${{ inputs.artifacts-url }} VERSION: ${{ inputs.openvox-agent-version }} - DMG_ARCH: ${{ matrix.arch }} + DMG_ARCH: ${{ matrix.host.arch }} run: |- package="openvox-agent/${VERSION}/openvox-agent-${VERSION}-1.macos.all.${DMG_ARCH}.dmg" if [[ -n "${GCS_BUCKET}" ]]; then @@ -552,8 +557,9 @@ jobs: - name: Write hosts.yaml and .beaker.yml working-directory: ${{ env.ACCEPTANCE_WORKING_DIR }} env: - BEAKER_PLATFORM: ${{ matrix.platform }} - BEAKER_CONFIG: ${{ needs.set-project-defaults.outputs.beaker-config }} + BEAKER_PLATFORM: ${{ matrix.host.platform }} + BEAKER_CONFIG: ${{ needs.set-project-defaults.outputs.serverless-beaker-config }} + SHARD: ${{ matrix.shard }} run: |- # Beaker runs commands on a host named localhost with hypervisor # none through its local connection instead of ssh. @@ -567,7 +573,11 @@ jobs: - agent EOF cat hosts.yaml - printf '%s\n' "${BEAKER_CONFIG}" > .beaker.yml + # A suite without shard tags gets an empty list, which runs every test. + jq --arg shard "${SHARD}" \ + '. + {test_tag_and: (if $shard == "" then [] else [$shard] end)}' \ + <<< "${BEAKER_CONFIG}" > .beaker.yml + cat .beaker.yml - name: Run Beaker working-directory: ${{ env.ACCEPTANCE_WORKING_DIR }} @@ -579,15 +589,17 @@ jobs: sudo -E env "PATH=${PATH}" bundle exec beaker exec acceptance-windows: - name: Windows Acceptance Tests (${{ matrix.runner }}) + name: Windows Acceptance Tests (${{ matrix.runner }}${{ matrix.shard && format(', {0}', matrix.shard) || '' }}) needs: set-project-defaults - if: inputs.suite-name == 'openvox-agent' && !inputs.fips && inputs.openvox-agent-version != '' + if: (inputs.suite-name == 'openvox-agent' || inputs.suite-name == 'openvox') && !inputs.fips && inputs.openvox-agent-version != '' runs-on: ${{ matrix.runner }} - timeout-minutes: 60 + timeout-minutes: 90 strategy: fail-fast: false matrix: runner: [windows-2022, windows-2025] + # One cell per runner for a suite without shard tags. + shard: ${{ fromJson(needs.set-project-defaults.outputs.acceptance-shard-tags)[0] && fromJson(needs.set-project-defaults.outputs.acceptance-shard-tags) || fromJson('[""]') }} env: ACCEPTANCE_WORKING_DIR: |- ${{ format('{0}/{1}/{2}', @@ -699,7 +711,8 @@ jobs: shell: bash env: BEAKER_PLATFORM: ${{ matrix.runner }}-64 - BEAKER_CONFIG: ${{ needs.set-project-defaults.outputs.beaker-config }} + BEAKER_CONFIG: ${{ needs.set-project-defaults.outputs.serverless-beaker-config }} + SHARD: ${{ matrix.shard }} run: |- # Any name but localhost, so Beaker connects over ssh. cat > hosts.yaml < .beaker.yml + cat .beaker.yml - name: Run Beaker working-directory: ${{ env.ACCEPTANCE_WORKING_DIR }} diff --git a/README.md b/README.md index 4c6daaf..a7a342d 100644 --- a/README.md +++ b/README.md @@ -164,9 +164,16 @@ everywhere but there. #### Windows and MacOS Support -nested_vms has no Windows or MacOS images, so the openvox-agent suite -also runs on GitHub-hosted Windows and MacOS runners, with the runner -itself as the only Beaker host. These cells install the MSI or DMG of +nested_vms has no Windows or MacOS images, so the tests that need no +server also run on GitHub-hosted Windows and MacOS runners, with the +runner itself as the only Beaker host: the whole openvox-agent suite, +and the openvox suite without its tests tagged `server`, split into the +suite's shards. A suite's `serverless-beaker-options` in +`scripts/project_defaults.json` adjust its Beaker options for these +cells. The openvox suite uses them to run only the pre-suite steps that +need no server, skip tests tagged `server`, and set Beaker's +`masterless` option. +These cells install the MSI or DMG of `openvox-agent-version` from the artifacts-url server, or from the GCS bucket when one is configured. They are skipped when no version is given and in FIPS runs. diff --git a/scripts/project-config.sh b/scripts/project-config.sh index 6f1f527..de065be 100755 --- a/scripts/project-config.sh +++ b/scripts/project-config.sh @@ -158,4 +158,10 @@ config=$(jq -c ' tests: .["acceptance-tests"] } + .["beaker-options"]' <<<"$config") +# The Windows and MacOS cells have no server, so a suite with tests that need +# one narrows them there with serverless-beaker-options. +config=$(jq -c ' + .["serverless-beaker-config"] = + .["beaker-config"] + (.["serverless-beaker-options"] // {})' <<<"$config") + echo "$config" diff --git a/scripts/project_defaults.json b/scripts/project_defaults.json index a128851..b821823 100644 --- a/scripts/project_defaults.json +++ b/scripts/project_defaults.json @@ -21,6 +21,14 @@ "helper": "lib/helper.rb", "options_file": "config/aio/options.rb" }, + "serverless-beaker-options": { + "pre_suite": [ + "pre-suite/000_configure_type_defaults.rb", + "pre-suite/015_prep_locales.rb" + ], + "test_tag_exclude": ["server"], + "masterless": true + }, "os-add": [], "vms": [ {