11name : Build and test MicroK8s snap
22
33on :
4- pull_request :
5- branches :
6- - master
4+ - push
75
86jobs :
97 build :
5755 path : build
5856 - name : Running upgrade path test
5957 run : |
60- sudo -E UPGRADE_MICROK8S_FROM=latest/edge UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade-path.py
58+ sudo -E STRICT=yes UPGRADE_MICROK8S_FROM=latest/edge/strict UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade-path.py
6159
6260 test-addons-core :
6361 name : Test core addons
@@ -80,13 +78,15 @@ jobs:
8078 with :
8179 name : microk8s.snap
8280 path : build
83- - name : Running addons tests
81+ - name : Running addons tests in strict mode
8482 run : |
8583 set -x
86- sudo snap install build/microk8s.snap --classic --dangerous
84+ sudo snap install build/microk8s.snap --dangerous
85+ sudo /snap/microk8s/current/connect-all-interfaces.sh
86+ sudo microk8s status --wait-ready --timeout 300
8787 ./tests/smoke-test.sh
8888 export UNDER_TIME_PRESSURE="True"
89- export SKIP_PROMETHEUS="False "
89+ export STRICT="yes "
9090 sudo -E bash -c "cd /var/snap/microk8s/common/addons/core/tests; pytest -s -ra test-addons.py"
9191
9292 test-addons-community :
@@ -114,7 +114,11 @@ jobs:
114114 run : |
115115 set -x
116116 sudo snap install build/microk8s.snap --classic --dangerous
117+ sudo /snap/microk8s/current/connect-all-interfaces.sh
118+ sudo microk8s status --wait-ready --timeout 300
117119 sudo microk8s enable community
120+ export UNDER_TIME_PRESSURE="True"
121+ export STRICT="yes"
118122 sudo -E bash -c "cd /var/snap/microk8s/common/addons/community/; pytest -s -ra ./tests/"
119123
120124 test-addons-core-upgrade :
@@ -142,7 +146,8 @@ jobs:
142146 run : |
143147 set -x
144148 export UNDER_TIME_PRESSURE="True"
145- sudo -E bash -c "UPGRADE_MICROK8S_FROM=latest/edge UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade.py"
149+ export STRICT="yes"
150+ sudo -E bash -c "UPGRADE_MICROK8S_FROM=latest/edge/strict UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade.py"
146151
147152 test-cluster-agent :
148153 name : Cluster agent health check
@@ -167,6 +172,7 @@ jobs:
167172 run : |
168173 set -x
169174 sudo snap install build/microk8s.snap --classic --dangerous
175+ sudo /snap/microk8s/current/connect-all-interfaces.sh
170176 sudo -E bash -c "pytest -s ./tests/test-cluster-agent.py"
171177
172178 test-airgap :
0 commit comments