diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 00000000..28564566 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,27 @@ +name: Run tests +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + build: + name: tests + runs-on: ubuntu-latest + strategy: + fail-fast: true + steps: + - name: 'Set up Python' + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - uses: actions/checkout@v2 + - run: pip install tox + - run: pip install tox-docker>=2.0.0a3 + - run: pip install coveralls + - run: tox -e py38-integration + - run: coveralls -v --service=github + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bf11dc31..00000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -sudo: false -language: python -cache: pip -python: 3.8 -os: - - linux -# - osx -services: - - docker -env: - global: - - PYTHONUNBUFFERED=True - - COVERALLS_PARALLEL=true - jobs: - - TOX_ENV=py38-integration -matrix: - fast_finish: true - allow_failures: - - os: osx -services: - - rabbitmq -install: - - pip install tox - - pip install tox-docker>=2.0.0a3 - - pip install coveralls -script: - - tox -e $TOX_ENV -after_success: - - coveralls -v -notifications: - webhooks: - - 'https://coveralls.io/webhook' diff --git a/README.rst b/README.rst index 81987ef7..d61c9c15 100644 --- a/README.rst +++ b/README.rst @@ -1,13 +1,13 @@ CloudMan is a cloud infrastructure and application manager, primarily for Galaxy. +.. image:: https://github.com/galaxyproject/cloudman/actions/workflows/tests.yaml/badge.svg + :target: https://github.com/galaxyproject/cloudman/actions/workflows/tests.yaml + :alt: Github Build Status + .. image:: https://coveralls.io/repos/github/galaxyproject/cloudman/badge.svg?branch=master :target: https://coveralls.io/github/galaxyproject/cloudman?branch=master :alt: Test Coverage Report -.. image:: https://travis-ci.org/galaxyproject/cloudman.svg?branch=master - :target: https://travis-ci.org/galaxyproject/cloudman - :alt: Travis Build Status - Installation ------------ CloudMan is intended to be installed via the `CloudMan Helm chart`_. diff --git a/cloudman/cloudman/urls.py b/cloudman/cloudman/urls.py index 1078ee3f..9d82bcd8 100644 --- a/cloudman/cloudman/urls.py +++ b/cloudman/cloudman/urls.py @@ -11,7 +11,7 @@ 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf - 1. Import the include() function: from django.conf.urls import url, include + 1. Import the include() function: from django.urls import re_path, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf import settings diff --git a/cloudman/clusterman/tests/test_cluster_api.py b/cloudman/clusterman/tests/test_cluster_api.py index 74f9f69a..b2aad5d3 100644 --- a/cloudman/clusterman/tests/test_cluster_api.py +++ b/cloudman/clusterman/tests/test_cluster_api.py @@ -1301,7 +1301,7 @@ def test_scale_up_unschedulable(self): # Ensure that the created node has the correct size vm_types = self._get_cluster_node_vm_types(cluster_id) self.assertEqual(len(vm_types), 1) - self.assertTrue("i3en.24xlarge" in vm_types) + self.assertTrue("i3en.24xlarge" in vm_types or 'dl1.24xlarge' in vm_types) def test_scale_up_allowed_vm_types(self): # create the parent cluster diff --git a/cloudman/clusterman/urls.py b/cloudman/clusterman/urls.py index 7804e40b..6de95c79 100644 --- a/cloudman/clusterman/urls.py +++ b/cloudman/clusterman/urls.py @@ -1,7 +1,7 @@ """CloudMan Create URL configuration.""" -from django.conf.urls import include -from django.conf.urls import url +from django.urls import include +from django.urls import re_path from . import views from djcloudbridge.drf_routers import HybridDefaultRouter @@ -28,6 +28,6 @@ cluster_regex_pattern = r'^' urlpatterns = [ - url(r'^', include(router.urls)), - url(cluster_regex_pattern, include(cluster_router.urls)) + re_path(r'^', include(router.urls)), + re_path(cluster_regex_pattern, include(cluster_router.urls)) ] diff --git a/cloudman/helmsman/urls.py b/cloudman/helmsman/urls.py index f463e2de..6c8f5440 100644 --- a/cloudman/helmsman/urls.py +++ b/cloudman/helmsman/urls.py @@ -1,7 +1,7 @@ """CloudMan Create URL configuration.""" -from django.conf.urls import include -from django.conf.urls import url +from django.urls import include +from django.urls import re_path from . import views from djcloudbridge.drf_routers import HybridDefaultRouter @@ -20,5 +20,5 @@ app_name = "helmsman" urlpatterns = [ - url(r'^', include(router.urls)), + re_path(r'^', include(router.urls)), ] diff --git a/cloudman/projman/urls.py b/cloudman/projman/urls.py index 17f90d2e..44ce2250 100644 --- a/cloudman/projman/urls.py +++ b/cloudman/projman/urls.py @@ -1,7 +1,7 @@ """CloudMan Create URL configuration.""" -from django.conf.urls import include -from django.conf.urls import url +from django.urls import include +from django.urls import re_path from . import views @@ -22,6 +22,6 @@ cluster_regex_pattern = r'^' urlpatterns = [ - url(r'^', include(router.urls)), - url(cluster_regex_pattern, include(project_router.urls)) + re_path(r'^', include(router.urls)), + re_path(cluster_regex_pattern, include(project_router.urls)) ] diff --git a/requirements_test.txt b/requirements_test.txt index b6804cd9..35d5862b 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -5,11 +5,12 @@ paramiko sqlalchemy # required by moto sshpubkeys -git+https://github.com/CloudVE/moto@fix_unknown_instance_type -git+https://github.com/CloudVE/cloudbridge +git+https://github.com/CloudVE/cloudbridge#egg=cloudbridge[dev] git+https://github.com/CloudVE/djcloudbridge # Leave cloudlaunch-cli before cloudlaunch-server due to coreapi version mismatch git+https://github.com/CloudVE/cloudlaunch-cli git+https://github.com/galaxyproject/cloudlaunch +pytz>=2022.2.1 +tzdata>=2022.2 -r requirements.txt -e ".[test]"