Skip to content

Bump actions/checkout from 3.0.2 to 4.0.0 #20

Bump actions/checkout from 3.0.2 to 4.0.0

Bump actions/checkout from 3.0.2 to 4.0.0 #20

Workflow file for this run

name: Build MicroK8s snap on PR and push to master
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Create snap package
runs-on: ubuntu-20.04
steps:
- name: Checking out repo
uses: actions/checkout@v4.0.0
- name: Install lxd
run: |
sudo lxd init --auto
sudo usermod --append --groups lxd $USER
sg lxd -c 'lxc version'
- name: Install snapcraft
run: |
sudo snap install snapcraft --classic
- name: Install snapd from candidate
run: |
sudo snap refresh snapd --channel=latest/beta
- name: Build snap
run: |
sg lxd -c 'snapcraft --use-lxd'
sudo mv microk8s*.snap microk8s.snap
- name: Uploading snap
uses: actions/upload-artifact@v3
with:
name: microk8s.snap
path: microk8s.snap
- name: Install test dependencies
run: |
set -x
sudo apt-get install python3-setuptools
sudo pip3 install --upgrade pip
sudo pip3 install -U pytest sh
sudo apt-get -y install open-iscsi
sudo systemctl enable iscsid
- name: Running upgrade path test
run: |
set -x
sudo -E UPGRADE_MICROK8S_FROM=latest/edge UPGRADE_MICROK8S_TO=`pwd`/`ls microk8s*.snap` pytest -s ./tests/test-upgrade-path.py
sudo snap remove microk8s --purge
- name: Running addons tests
run: |
set -x
sudo snap install *.snap --classic --dangerous
./tests/smoke-test.sh
export UNDER_TIME_PRESSURE="True"
export SKIP_PROMETHEUS="False"
(cd tests; pytest -s verify-branches.py)
sudo -E bash -c "cd /var/snap/microk8s/common/addons/core/tests; pytest -s -ra test-addons.py"
sudo microk8s enable community
sudo -E bash -c "cd /var/snap/microk8s/common/addons/community/tests; pytest -s -ra test-addons.py"
sudo snap remove microk8s --purge
- name: Running upgrade tests
run: |
set -x
sudo snap install *.snap --classic --dangerous
export UNDER_TIME_PRESSURE="True"
sudo -E bash -c "cd /var/snap/microk8s/common/addons/core/ ; UPGRADE_MICROK8S_FROM=latest/edge UPGRADE_MICROK8S_TO=`pwd`/`ls microk8s*.snap` pytest -s ./tests/test-upgrade.py"
sudo snap remove microk8s --purge