diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 59eda47..d1cda8a 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -17,7 +17,7 @@ on: - cron: 0 1 * * * jobs: - test_with_minikube_linux: + test_with_minikube: name: Run tests strategy: matrix: @@ -30,39 +30,41 @@ jobs: - name: Check out repository code uses: actions/checkout@v2 - - name: Linux - Setup Minikube + - name: Start minikube + uses: medyagh/setup-minikube@latest + +# This step is disabled until the issue is addressed: https://github.com/redhat-actions/openshift-tools-installer/issues/66 +# - name: Install ODO +# uses: redhat-actions/openshift-tools-installer@v1 +# with: +# # Installs the latest release of odo +# odo: "latest" + + - name: Install ODO for Linux if: matrix.os == 'ubuntu-latest' - uses: manusa/actions-setup-minikube@v2.4.2 - with: - minikube version: 'v1.21.0' - kubernetes version: 'v1.21.0' - driver: 'docker' - github token: ${{ secrets.GITHUB_TOKEN }} - start args: '--addons=ingress' + run: | + curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-linux-amd64 -o odo + curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-linux-amd64.sha256 -o odo.sha256 + echo "$(= '3.7'", - "version": "==2.0.0" + "version": "==2.0.1" } } } diff --git a/README.md b/README.md index fe4255d..061dcc3 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ All related issues are being tracked under the main devfile API repo https://git ## Pytest for ODO ### Prerequisites -- Python 3.9.9 +- Python 3.9.10 - pipenv : run `pip install --user pipenv` - Minikube or OpenShift - odo diff --git a/pyvenv.cfg b/pyvenv.cfg index 2ac23b3..d009fb1 100644 --- a/pyvenv.cfg +++ b/pyvenv.cfg @@ -1,3 +1,3 @@ home = /usr/local/bin include-system-site-packages = false -version = 3.9.9 +version = 3.9.10 diff --git a/tests/test_catalog_cmd.py b/tests/test_catalog_cmd.py index e0605c7..7048c77 100644 --- a/tests/test_catalog_cmd.py +++ b/tests/test_catalog_cmd.py @@ -1,3 +1,4 @@ +import sys from utils.config import * from utils.util import * @@ -57,7 +58,7 @@ def test_catalog_cmd_list_components_json_format(self): assert validate_json_format(result.stdout) assert match_all(result.stdout, list_components) - + @pytest.mark.skipif(sys.platform == "linux", reason="An issue is found on Linux") def test_catalog_cmd_list_describe_json_format(self): print('Test case : when executing catalog describe component with -o json, it should display a valid JSON') diff --git a/tests/test_dot_devfile_cmd.py b/tests/test_dot_devfile_cmd.py index a1fbbd1..c94946e 100644 --- a/tests/test_dot_devfile_cmd.py +++ b/tests/test_dot_devfile_cmd.py @@ -40,7 +40,7 @@ def test_url_create_with_dot_devfile(self): os.chdir(self.CONTEXT) # Todo: compatibility test with .devfile.yaml is working with odo version higher than v2.5.0. - # Decomment the line when odo mirror site issue is fixed. + # Uncomment the line when odo mirror site issue is fixed. # subprocess.run(["mv", "devfile.yaml", ".devfile.yaml"]) subprocess.run(["odo", "url", "create", self.ENDPOINT_1, "--port", self.PORT_1, "--host", self.HOST, "--secure", "--ingress"])