Skip to content
Merged
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
50 changes: 33 additions & 17 deletions .github/workflows/beaker_acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}',
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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 }}
Expand All @@ -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}',
Expand Down Expand Up @@ -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 <<EOF
Expand All @@ -715,8 +728,11 @@ jobs:
- agent
EOF
cat hosts.yaml
jq --arg ssh_key "${BEAKER_SSH_KEY}" '. + {ssh: {keys: [$ssh_key]}}' \
# A suite without shard tags gets an empty list, which runs every test.
jq --arg ssh_key "${BEAKER_SSH_KEY}" --arg shard "${SHARD}" \
'. + {ssh: {keys: [$ssh_key]}, 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 }}
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 6 additions & 0 deletions scripts/project-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
8 changes: 8 additions & 0 deletions scripts/project_defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
Loading