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
@@ -69,18 +67,20 @@ jobs:
6967 uses : actions/checkout@v4
7068 - name : Prepare test prerequisites
7169 uses : ./.github/actions/test-prep
72- - name : Running addons tests
70+ - name : Running addons tests in strict mode
7371 env :
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.
81+ export STRICT="yes"
8182 export POD_CIDR="10.200.0.0/16"
8283 export POD_GATEWAY="10.200.0.1"
83- export SKIP_PROMETHEUS="False"
8484 export UNDER_TIME_PRESSURE=${UNDER_TIME_PRESSURE@u}
8585 sudo -E bash -c "cd /var/snap/microk8s/common/addons/core/tests; pytest -s -ra test-addons.py"
8686
@@ -100,8 +100,11 @@ jobs:
100100 run : |
101101 set -x
102102 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
103105 sudo microk8s enable community
104106 export UNDER_TIME_PRESSURE=${UNDER_TIME_PRESSURE@u}
107+ export STRICT="yes"
105108 sudo -E bash -c "cd /var/snap/microk8s/common/addons/community/; pytest -s -ra ./tests/"
106109
107110 test-addons-core-upgrade :
@@ -120,7 +123,8 @@ jobs:
120123 run : |
121124 set -x
122125 export UNDER_TIME_PRESSURE=${UNDER_TIME_PRESSURE@u}
123- sudo -E bash -c "UPGRADE_MICROK8S_FROM=latest/edge UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade.py"
126+ export STRICT="yes"
127+ sudo -E bash -c "UPGRADE_MICROK8S_FROM=latest/edge/strict UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade.py"
124128
125129 test-cluster-agent :
126130 name : Cluster agent health check
@@ -136,6 +140,7 @@ jobs:
136140 run : |
137141 set -x
138142 sudo snap install build/microk8s.snap --classic --dangerous
143+ sudo /snap/microk8s/current/connect-all-interfaces.sh
139144 sudo -E bash -c "pytest -s ./tests/test-cluster-agent.py"
140145
141146 test-airgap :
0 commit comments