Test load-balancer administration #5
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
call-inclusive-naming-check: | |
name: Inclusive Naming | |
uses: canonical-web-and-design/Inclusive-naming/.github/workflows/woke.yaml@main | |
with: | |
fail-on-error: "true" | |
lint-unit: | |
name: Lint Unit | |
uses: charmed-kubernetes/workflows/.github/workflows/lint-unit.yaml@main | |
with: | |
python: "['3.8', '3.9', '3.10', '3.11']" | |
needs: | |
- call-inclusive-naming-check | |
charmcraft-build: | |
name: Build Charm | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Install and prepare LXD snap environment | |
run: | | |
sudo apt-get remove -qy lxd lxd-client | true | |
sudo snap list lxd | true | |
sudo snap install lxd --channel=latest/stable | |
sudo snap refresh lxd --channel=latest/stable | |
sudo lxd waitready | |
sudo lxd init --auto | |
sudo chmod a+wr /var/snap/lxd/common/lxd/unix.socket | |
sudo lxc network set lxdbr0 ipv6.address none | |
sudo usermod -a -G lxd $USER | |
sg lxd -c 'lxc version' | |
- name: Remove Docker | |
run: | | |
# https://github.com/canonical/lxd-cloud/blob/f20a64a8af42485440dcbfd370faf14137d2f349/test/includes/lxd.sh#L13-L23 | |
sudo rm -rf /etc/docker | |
sudo apt-get purge moby-buildx moby-engine moby-cli moby-compose moby-containerd moby-runc -y | |
sudo iptables -P FORWARD ACCEPT | |
- name: Install Charmcraft | |
run: | | |
sudo snap install charmcraft --classic --channel=latest/stable | |
- name: Build Charm | |
run: | | |
sg lxd -c 'charmcraft pack -v' | |
- name: Upload charm artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: gcp-cloud-provider.charm | |
path: ./cp-cloud-provider*.charm | |
- name: Upload debug artifacts | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: charmcraft-logs | |
path: /home/runner/snap/charmcraft/common/cache/charmcraft/log/charmcraft-*.log |