11name : Build and test MicroK8s snap
22
33on :
4- pull_request :
5- branches : [1.33]
4+ - push
5+ - pull_request
66
77jobs :
88 build :
5353 uses : ./.github/actions/test-prep
5454 - name : Running upgrade path test
5555 run : |
56- sudo -E UPGRADE_MICROK8S_FROM=1.33/edge UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade-path.py
56+ sudo -E STRICT=yes UPGRADE_MICROK8S_FROM=1.33-strict /edge UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade-path.py
5757
5858 test-addons-core :
5959 name : Test core addons
7474 run : |
7575 set -x
7676 sudo snap install build/microk8s.snap --classic --dangerous
77+ sudo /snap/microk8s/current/connect-all-interfaces.sh
78+ sudo microk8s status --wait-ready --timeout 300
7779 ./tests/smoke-test.sh
80+ export STRICT="yes"
7881 # The GitHub runner is using the 10.1.0.0/16 CIDR, which would conflict with
7982 # kube-ovn's default POD_CIDR. They have to be different.
8083 export POD_CIDR="10.200.0.0/16"
@@ -99,8 +102,11 @@ jobs:
99102 run : |
100103 set -x
101104 sudo snap install build/microk8s.snap --classic --dangerous
105+ sudo /snap/microk8s/current/connect-all-interfaces.sh
106+ sudo microk8s status --wait-ready --timeout 300
102107 sudo microk8s enable community
103108 export UNDER_TIME_PRESSURE=${UNDER_TIME_PRESSURE@u}
109+ export STRICT="yes"
104110 sudo -E bash -c "cd /var/snap/microk8s/common/addons/community/; pytest -s -ra ./tests/"
105111
106112 test-addons-core-upgrade :
@@ -119,7 +125,8 @@ jobs:
119125 run : |
120126 set -x
121127 export UNDER_TIME_PRESSURE=${UNDER_TIME_PRESSURE@u}
122- sudo -E bash -c "UPGRADE_MICROK8S_FROM=1.33/edge UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade.py"
128+ export STRICT="yes"
129+ sudo -E bash -c "UPGRADE_MICROK8S_FROM=1.33-strict/edge UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade.py"
123130
124131 test-cluster-agent :
125132 name : Cluster agent health check
@@ -135,6 +142,7 @@ jobs:
135142 run : |
136143 set -x
137144 sudo snap install build/microk8s.snap --classic --dangerous
145+ sudo /snap/microk8s/current/connect-all-interfaces.sh
138146 sudo -E bash -c "pytest -s ./tests/test-cluster-agent.py"
139147
140148 test-airgap :
0 commit comments