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
39 changes: 30 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ jobs:
newgrp lxd

- name: Install charmcraft
run: sudo snap install charmcraft --classic --channel=3.x/stable
# We use latest because there's no 4.x track yet.
run: sudo snap install charmcraft --classic --channel=latest/stable

- name: Pack charm
run: sg lxd -c "charmcraft pack"
Expand Down Expand Up @@ -133,28 +134,43 @@ jobs:
env:
CHARMCRAFT_AUTH: ${{ secrets.CHARMCRAFT_AUTH }}
run: |
sudo snap install charmcraft --channel 3.x/stable --classic
# We use latest because there's no 4.x track yet.
sudo snap install charmcraft --channel latest/stable --classic
for FILE in *.charm; do
echo "Uploading: $FILE"
charmcraft upload --name "$CHARM_NAME" --release "${{ needs.channel.outputs.test }}" "$FILE"
done


integration:
name: "Integration tests"
name: Integration tests (${{ matrix.test_name }})
runs-on: ubuntu-latest
needs: [build, upload, channel]
strategy:
fail-fast: false
matrix:
cloud: ["lxd", "microk8s"]
include:
- test_name: lxd-20.04
cloud: lxd
bootstrap_base: ubuntu@20.04
- test_name: lxd-22.04
cloud: lxd
bootstrap_base: ubuntu@22.04
- test_name: lxd-24.04
cloud: lxd
bootstrap_base: ubuntu@24.04
- test_name: lxd-26.04
cloud: lxd
bootstrap_base: ubuntu@26.04
- test_name: microk8s
cloud: microk8s

steps:
- name: Save charmcraft logs as artifact
if: always() && steps.charmcraft.outcome != 'skipped'
uses: actions/upload-artifact@v4
with:
name: charmcraft-upload-logs
name: charmcraft-upload-logs-${{ matrix.test_name }}
path: ~/.local/state/charmcraft/log/
continue-on-error: true

Expand All @@ -166,17 +182,18 @@ jobs:
if: matrix.cloud == 'microk8s'
uses: balchua/microk8s-actions@v0.4.2
with:
channel: "1.25-strict/stable"
channel: "1.36-strict/stable"
addons: '["dns", "hostpath-storage"]'

- name: Install Juju
run: |
sudo snap install juju --channel 3.6/candidate
sudo snap install juju --channel 3/stable

- name: Bootstrap on LXD
if: matrix.cloud == 'lxd'
run: |
juju bootstrap lxd c \
--bootstrap-base=${{ matrix.bootstrap_base }} \
--controller-charm-channel=${{ needs.channel.outputs.test }}

- name: Bootstrap on MicroK8s
Expand All @@ -198,7 +215,7 @@ jobs:
juju status
sleep 10

elapsed=$(date -u +%s)-${start_time}
elapsed=$(( $(date -u +%s) - start_time ))
if [[ ${elapsed} -ge 600 ]]; then
echo "Timed out waiting for controller to become active"
juju status
Expand All @@ -211,7 +228,11 @@ jobs:
run: |
set -x
set +e
juju status
juju status -m controller
juju debug-log -m controller --replay
sg snap_microk8s <<EOF
microk8s.kubectl -n controller-c get all
microk8s.kubectl -n controller-c get -o yaml pod/controller-0
EOF

# TODO: test integration with dashboard / ha-proxy
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

You will need to have Python 3, Charmcraft and [uv](https://docs.astral.sh/uv/) installed.
```
sudo snap install charmcraft --classic
sudo snap install charmcraft --classic --channel latest/stable
sudo snap install astral-uv --classic
```

Expand Down
4 changes: 4 additions & 0 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ platforms:
ubuntu@24.04:arm64:
ubuntu@24.04:s390x:
ubuntu@24.04:ppc64el:
ubuntu@26.04:amd64:
ubuntu@26.04:arm64:
ubuntu@26.04:s390x:
ubuntu@26.04:ppc64el:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whom ever merges forward, we should see if we need to ask riscv64.

Loading