11name : Build and test MicroK8s snap
22
33on :
4- pull_request :
5- branches :
6- - master
4+ - push
75
86jobs :
97 build :
5452 uses : ./.github/actions/test-prep
5553 - name : Running upgrade path test
5654 run : |
57- sudo -E UPGRADE_MICROK8S_FROM=latest/edge UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade-path.py
55+ sudo -E STRICT=yes UPGRADE_MICROK8S_FROM=latest/edge/strict UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade-path.py
5856
5957 test-addons-core :
6058 name : Test core addons
@@ -74,13 +72,16 @@ jobs:
7472 UNDER_TIME_PRESSURE : ${{ !contains(github.event.pull_request.labels.*.name, 'run-all-tests') }}
7573 run : |
7674 set -x
77- sudo snap install build/microk8s.snap --classic --dangerous
75+ sudo snap install build/microk8s.snap --dangerous
76+ sudo /snap/microk8s/current/connect-all-interfaces.sh
77+ sudo microk8s status --wait-ready --timeout 300
7878 ./tests/smoke-test.sh
7979 # The GitHub runner is using the 10.1.0.0/16 CIDR, which would conflict with
8080 # kube-ovn's default POD_CIDR. They have to be different.
8181 export POD_CIDR="10.200.0.0/16"
8282 export POD_GATEWAY="10.200.0.1"
8383 export SKIP_PROMETHEUS="False"
84+ export STRICT="yes"
8485 sudo -E bash -c "cd /var/snap/microk8s/common/addons/core/tests; pytest -s -ra test-addons.py"
8586
8687 test-addons-community :
@@ -99,7 +100,10 @@ jobs:
99100 run : |
100101 set -x
101102 sudo snap install build/microk8s.snap --classic --dangerous
103+ sudo /snap/microk8s/current/connect-all-interfaces.sh
104+ sudo microk8s status --wait-ready --timeout 300
102105 sudo microk8s enable community
106+ export STRICT="yes"
103107 sudo -E bash -c "cd /var/snap/microk8s/common/addons/community/; pytest -s -ra ./tests/"
104108
105109 test-addons-core-upgrade :
@@ -117,7 +121,8 @@ jobs:
117121 UNDER_TIME_PRESSURE : ${{ !contains(github.event.pull_request.labels.*.name, 'run-all-tests') }}
118122 run : |
119123 set -x
120- sudo -E bash -c "UPGRADE_MICROK8S_FROM=latest/edge UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade.py"
124+ export STRICT="yes"
125+ sudo -E bash -c "UPGRADE_MICROK8S_FROM=latest/edge/strict UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade.py"
121126
122127 test-cluster-agent :
123128 name : Cluster agent health check
@@ -133,6 +138,7 @@ jobs:
133138 run : |
134139 set -x
135140 sudo snap install build/microk8s.snap --classic --dangerous
141+ sudo /snap/microk8s/current/connect-all-interfaces.sh
136142 sudo -E bash -c "pytest -s ./tests/test-cluster-agent.py"
137143
138144 test-airgap :
0 commit comments