diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 31dfff5..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,64 +0,0 @@ -# Python CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-python/ for more details -# -version: 2 -jobs: - build: - docker: - # specify the version you desire here - # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` - - image: circleci/python:3.7 - - image: postgres:11 - environment: - POSTGRES_USER: circleci - POSTGRES_DB: circle_test - POSTGRES_PASSWORD: circle_test_pwd9988 - - image: redis:3.2 - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/postgres:9.4 - - working_directory: ~/repo - - steps: - - checkout - - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "requirements.txt" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - - run: - name: install dependencies - command: | - python3 -m venv venv - . venv/bin/activate - pip install -r requirements.txt - - - save_cache: - paths: - - ./venv - key: v1-dependencies-{{ checksum "requirements.txt" }} - - # run tests! - - run: - name: run tests - command: | - cp trunk_player/settings_local.py.circleci trunk_player/settings_local.py - . venv/bin/activate - python manage.py test - - - store_artifacts: - path: test-reports - destination: test-reports - - - deploy: - command: | - if [ "${CIRCLE_BRANCH}" == "scanoc" ]; then - .circleci/deploy_prod.sh - fi diff --git a/.circleci/deploy_prod.sh b/.circleci/deploy_prod.sh deleted file mode 100755 index a77ab37..0000000 --- a/.circleci/deploy_prod.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "`date` Start circleci deploy" -ssh -o StrictHostKeyChecking=no $DEPLOY_USER@$DEPLOY_SERVER "$DEPLOY_SCRIPT" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8a7f1e7..6aef89a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,10 +26,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.9 + - name: Set up Python 3.12 uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: 3.12 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/radio/tests/test_generic_pages.py b/radio/tests/test_generic_pages.py index 03d03f6..b7f5408 100644 --- a/radio/tests/test_generic_pages.py +++ b/radio/tests/test_generic_pages.py @@ -18,4 +18,4 @@ def setUp(self): def test_page_exists(self): client = Client() response = client.get(reverse('pages', kwargs={'page_name': 'FirstPage'})) - self.assertEquals(response.status_code, 200) + self.assertEqual(response.status_code, 200) diff --git a/radio/tests/test_talkgroup_access.py b/radio/tests/test_talkgroup_access.py index a1f4f3b..45fcf66 100644 --- a/radio/tests/test_talkgroup_access.py +++ b/radio/tests/test_talkgroup_access.py @@ -36,7 +36,7 @@ def setUp(self): def test_talkgroup_exists(self): tg = TalkGroup.objects.get(alpha_tag = 'Test TG 1') - self.assertEquals(str(tg), 'Test TG 1') + self.assertEqual(str(tg), 'Test TG 1') @override_settings(ACCESS_TG_RESTRICT=False) def test_talkgroup_access_open(self): @@ -44,7 +44,7 @@ def test_talkgroup_access_open(self): response = self.client.get('/api_v1/tg/test-tg-1/') self.assertEqual(response.status_code, 200) data = json.loads(str(response.content, encoding='utf8')) - self.assertEquals(data['count'], 1) + self.assertEqual(data['count'], 1) @override_settings(ACCESS_TG_RESTRICT=True) def test_talkgroup_access_user1(self): @@ -54,7 +54,7 @@ def test_talkgroup_access_user1(self): response = TalkGroupFilterViewSet.as_view()(request, filter_val='test-tg-1').render() #print(response.content) data = json.loads(str(response.content, encoding='utf8')) - self.assertEquals(data['count'], 1) + self.assertEqual(data['count'], 1) @override_settings(ACCESS_TG_RESTRICT=True) def test_talkgroup_access_user2(self): @@ -64,5 +64,5 @@ def test_talkgroup_access_user2(self): response = TalkGroupFilterViewSet.as_view()(request, filter_val='test-tg-1').render() #print(response.content) data = json.loads(str(response.content, encoding='utf8')) - self.assertEquals(data['count'], 0) + self.assertEqual(data['count'], 0)