Pin non canonical owned snaps unless workflow specifically overrides #353
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Operator Setup | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
Inclusive-naming-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: woke | |
uses: canonical-web-and-design/inclusive-naming@main | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
reporter: github-pr-check | |
fail-on-error: true | |
test-lxd: | |
name: Test lxd environment | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- ubuntu-22.04 | |
juju: | |
- '2.9' | |
- '3.1' | |
- '3.3' | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- uses: ./ | |
with: | |
provider: lxd | |
channel: latest/stable | |
juju-channel: ${{ matrix.juju }}/stable | |
- name: Run 3.x Tests | |
if : ${{ fromJSON(matrix.juju) > 3 }} | |
run: | | |
tox -e tests -- -k "not k8s" | |
exit $? | |
- name: Run 2.9 Tests | |
if : ${{ fromJSON(matrix.juju) < 3 }} | |
run: | | |
tox -e 2.9-tests -- -k "not k8s" | |
exit $? | |
test-microk8s-strict: | |
name: Test microk8s strict | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- ubuntu-22.04 | |
channel: | |
- 1.28-strict/stable | |
- 1.27-strict/stable | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- uses: ./ | |
with: | |
provider: microk8s | |
channel: ${{ matrix.channel }} | |
- name: Run Tests | |
run: | | |
tox -e tests -- -k "not machine" | |
test-microk8s-classic: | |
name: Test microk8s classic | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- ubuntu-22.04 | |
channel: | |
- 1.28/stable | |
- latest/stable | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- uses: ./ | |
with: | |
provider: microk8s | |
channel: ${{ matrix.channel }} | |
juju-channel: 2.9/stable | |
- name: Run Tests | |
run: | | |
tox -e 2.9-tests -- -k "not machine" | |
test-microk8s-default-addons: | |
name: Test default addons are enabled by microk8s provider. | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- uses: ./ | |
with: | |
provider: microk8s | |
channel: 1.28-strict/stable | |
- name: Run Tests | |
run: | | |
tox -e tests -- -k "addons" --addons "storage dns rbac" | |
test-microstack: | |
runs-on: self-hosted | |
name: Test microstack environment | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- uses: ./ | |
with: | |
provider: microstack | |
- name: Run Tests | |
run: | | |
tox -e tests -- -k "not k8s" | |
test-vSphere: | |
runs-on: self-hosted | |
name: Test vSphere environment | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- uses: ./ | |
with: | |
provider: vsphere | |
credentials-yaml: ${{ secrets.CREDENTIALS_YAML }} | |
clouds-yaml: ${{ secrets.CLOUDS_YAML }} | |
bootstrap-options: "--model-default datastore=vsanDatastore --model-default primary-network=VLAN_2764 --bootstrap-image=juju-ci-root/templates/jammy-test-template --bootstrap-series=jammy" | |
bootstrap-constraints: "arch=amd64 cores=2 mem=4G" | |
- name: Run Tests | |
run: | | |
tox -e tests -- -k "not k8s" | |
test-multi-controller: | |
name: Test microk8s next to lxd | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Setup k8s controller | |
uses: ./ | |
with: | |
provider: microk8s | |
channel: 1.28-strict/stable | |
- name: Save k8s controller name | |
id: k8s-controller | |
# The `CONTROLLER_NAME` envvar is set by this actions | |
run: echo "name=$CONTROLLER_NAME" >> $GITHUB_OUTPUT | |
- name: Setup lxd controller | |
uses: charmed-kubernetes/actions-operator@main | |
with: | |
provider: lxd | |
- name: Save lxd controller name | |
id: lxd-controller | |
# The `CONTROLLER_NAME` envvar is set by this action | |
run: echo "name=$CONTROLLER_NAME" >> $GITHUB_OUTPUT | |
- name: Test we can switch to the controllers | |
run: | | |
juju switch ${{ steps.k8s-controller.outputs.name }} | |
juju switch ${{ steps.lxd-controller.outputs.name }} |