Skip to content

Commit

Permalink
Add functional testing for bundles
Browse files Browse the repository at this point in the history
This change adds some basic level of functional testing for pull
requests. The tests generate some common deployment scenarios and start
deploying those. This tests for example whether the charms are available
from the charmhub and whether the chosen versions are compatible with
each other.

Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
  • Loading branch information
nicolasbock committed Sep 12, 2023
1 parent d52c5ed commit dc54db5
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/functional.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Functional Testing

on:
pull_request:
branches:
- main

jobs:
functional:
name: Run functional tests
runs-on: ubuntu-latest
steps:

- name: Get sources
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: canonical/setup-lxd@v0.1.1

- name: Install Juju
run: |
set -e -u -x
sudo snap install juju --channel 2.9 --classic
- name: Bootstrap controller
run: |
set -e -u -x
juju bootstrap localhost controller
- name: Focal / Ussuri
run: |
set -e -u -x
cd openstack
./generate --name functional --series focal --release ussuri --run
juju status
juju switch default
juju destroy-model --yes --destroy-storage --force --no-wait functional
3 changes: 1 addition & 2 deletions .github/workflows/issues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ jobs:
sync-issues:
runs-on: ubuntu-latest
steps:
- uses: alex-page/github-project-automation-plus@v0.8.1
- uses: alex-page/github-project-automation-plus@v0.8.3
with:
project: 'Automation and Tooling'
column: 'To Do'
repo-token: ${{ secrets.PROJ_MNG }}

4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install tools
run: sudo apt install --no-install-recommends --yes python3-bashate
- name: Get sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Lint bash scripts
run: |
bashate --ignore E006 --verbose openstack/tools/create-microceph-vm.sh tools/*.sh tools/juju-lnav openstack/novarc
Expand All @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Get sources
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check Commit Message
Expand Down

0 comments on commit dc54db5

Please sign in to comment.