Skip to content

Commit

Permalink
ci: use Concierge to set up the smoke test environments (#1541)
Browse files Browse the repository at this point in the history
The smoke tests are currently failing because of `sg` behaviour changes
in the `ubuntu:latest` runners. Rather than figure out what the solution
for that is, this PR simplifies the entire environment setup to just use
Concierge instead.

This also switches from testing against Juju 3.5 to 3/latest (which is
3.6), since 3.6 is available now and the intention was always to test
against the latest 3.

A [run can be seen in my
fork](https://github.com/tonyandrewmeyer/operator/actions/runs/13003299600).
  • Loading branch information
tonyandrewmeyer authored Jan 28, 2025
1 parent e8ac439 commit bc0e1c6
Showing 1 changed file with 7 additions and 38 deletions.
45 changes: 7 additions & 38 deletions .github/workflows/smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,16 @@ jobs:
matrix:
# pylibjuju does not currently support Juju 4.x
# The smoke tests do not yet work on Juju 2.9.
juju-version: ['3.5']
charmcraft-version: ['2.x', '3.x']
cloud: ['lxd', 'microk8s']

env:
JUJU_VERSION: "${{ matrix.juju-version }}"
juju-channel: ['3/stable']
charmcraft-channel: ['2.x/stable', '3.x/stable']
preset: ['machine', 'microk8s']

steps:
# LXD is required for charmcraft to pack, even if it's not used as the
# Juju cloud.
- name: Set up LXD
uses: canonical/setup-lxd@54a5806e490d92e207b57183cf111ed54bbdeff4
with:
channel: 5.0/stable

- name: Set up Microk8s
if: matrix.cloud == 'microk8s'
uses: balchua/[email protected]
with:
channel: '1.26-strict/stable'
devMode: 'true'
addons: '["dns", "hostpath-storage"]'

- name: Set up Juju (classic)
if: matrix.juju-version == '2.9'
run: sudo snap install juju --classic --channel=${{ matrix.juju-version }}

- name: Set up Juju
if: matrix.juju-version != '2.9'
run: sudo snap install juju --channel=${{ matrix.juju-version }}

- name: Bootstrap Juju controller (k8s)
if: matrix.cloud == 'microk8s'
run: sg snap_microk8s -c 'juju bootstrap microk8s'

- name: Bootstrap Juju controller (lxd)
if: matrix.cloud == 'lxd'
run: juju bootstrap localhost
- name: Install concierge
run: sudo snap install --classic concierge

- name: Install charmcraft
run: sudo snap install charmcraft --channel=${{ matrix.charmcraft-version }} --classic
- name: Install Juju and tools
run: sudo concierge prepare --juju-channel=${{ matrix.juju-channel }} --charmcraft-channel=${{ matrix.charmcraft-channel }} -p "${{ matrix.preset }}"

- name: Checkout the repository
uses: actions/checkout@v4
Expand Down

0 comments on commit bc0e1c6

Please sign in to comment.