Skip to content

build: re-enable VM tests #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
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
19 changes: 13 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
name: Test
runs-on: macos-12
continue-on-error: ${{ inputs.continue-on-error }}
strategy:
matrix:
platform-name:
- workstation-pop-os
- server-nas
- server-pi

steps:
- name: Checkout
Expand All @@ -41,6 +47,12 @@ jobs:
- name: Install dependencies
run: just install-dependencies

- name: Update brew
run: brew update

- name: Update VirtualBox
run: brew upgrade virtualbox

- name: Cache Vagrant boxes
# yamllint disable-line rule:line-length
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
Expand All @@ -52,9 +64,4 @@ jobs:
restore-keys: ${{ runner.os }}-vagrant-

- name: Test
run: >
echo "Tests are temporarily disabled.
See:
- https://github.com/actions/runner-images/issues/8730
- https://github.com/actions/runner-images/issues/8642
"
run: just test --platform-name ${{ matrix.platform-name }}
14 changes: 7 additions & 7 deletions ansible/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,37 @@ install-dependencies:
test *extra_args:
#!/usr/bin/env bash
source env/bin/activate
molecule {{extra_args}} test
molecule test {{extra_args}}

# Create hosts locally
up *extra_args:
#!/usr/bin/env bash
source env/bin/activate
molecule {{extra_args}} create
molecule create {{extra_args}}

# Create and configure hosts locally
run *extra_args:
#!/usr/bin/env bash
source env/bin/activate
molecule {{extra_args}} converge
molecule converge {{extra_args}}

# Create and configure hosts locally for `test` tags
run-test *extra_args:
#!/usr/bin/env bash
source env/bin/activate
molecule {{extra_args}} converge -- --tags test -vv
molecule converge {{extra_args}} -- --tags test -vv

# Create and configure hosts locally with debug logs
run-debug *extra_args:
#!/usr/bin/env bash
source env/bin/activate
molecule --debug {{extra_args}} converge -- -vvv
molecule converge --debug {{extra_args}} -- -vvv

# Create and configure hosts locally for `test` tags with debug logs
run-test-debug *extra_args:
#!/usr/bin/env bash
source env/bin/activate
molecule {{extra_args}} converge -- --tags test -vvv
molecule converge {{extra_args}} -- --tags test -vvv

# Log in to a locally created host
login host:
Expand All @@ -60,7 +60,7 @@ login host:
down *extra_args:
#!/usr/bin/env bash
source env/bin/activate
molecule {{extra_args}} destroy
molecule destroy {{extra_args}}

# Edit dev vault
edit-dev-vault:
Expand Down
14 changes: 8 additions & 6 deletions ansible/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,28 @@ driver:
platforms:
- name: workstation-pop-os
groups: [workstations]
# `cpus` need to roughly match the core count used by the CI. Currently, we
# are using a 3-core macos-12 instance in '.github/workflows/test.yml',
# therefore we are using 2x 2-core instances with vagrant.
# `cpus` need to roughly match the core count used by the CI, otherwise
# there is a risk of GitHub shutting the runner down due to overloading.
# Currently, we are using a 3-core macos-12 instance in
# '.github/workflows/test.yml' which runs a single vagrant instance per
# matrix test, therefore we are using 2 cores per instance with vagrant.
# See:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
cpus: 2
cpus: 1
memory: 2048

- name: server-nas
groups: [servers]
# See note on `cpus` above
cpus: 2
cpus: 1
# server-nas needs extra memory primarily due to the amount of docker apps
# that are running
memory: 4096

- name: server-pi
groups: [servers]
# See note on `cpus` above
cpus: 2
cpus: 1
memory: 2048

provisioner:
Expand Down