From fab86b7cedca94f47f176ed8d960b9f23a434805 Mon Sep 17 00:00:00 2001 From: Dihooker <83437674+Dihooker@users.noreply.github.com> Date: Wed, 15 Dec 2021 00:26:37 -0500 Subject: [PATCH 01/13] Update requirements.txt --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4ebc8aea..6a3f1164 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ -coverage +pip install pytest-cov +pytest --cov=./ --cov-report=xml From a685e31b6484cbf46f68a9fc508565e10fc24587 Mon Sep 17 00:00:00 2001 From: Dihooker <83437674+Dihooker@users.noreply.github.com> Date: Fri, 17 Dec 2021 21:49:54 -0500 Subject: [PATCH 02/13] Update config.yml --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index edf6a031..65f03205 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,6 +2,7 @@ version: 2.1 orbs: codecov: codecov/codecov@3.0.0 + jobs: build: docker: From d0dff3088f33350efb81deb4090407ac88aacae4 Mon Sep 17 00:00:00 2001 From: Dihooker <83437674+Dihooker@users.noreply.github.com> Date: Fri, 17 Dec 2021 21:52:31 -0500 Subject: [PATCH 03/13] Updated config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 65f03205..62d939b5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,5 @@ version: 2.1 -orbs: +orb: codecov: codecov/codecov@3.0.0 @@ -17,7 +17,7 @@ jobs: command: | coverage run tests.py coverage xml - - codecov/upload + workflow: version: 2.1 From 058c9eab7c8649a8580665b428df3700f3d3aae8 Mon Sep 17 00:00:00 2001 From: Dihooker <83437674+Dihooker@users.noreply.github.com> Date: Fri, 17 Dec 2021 21:58:21 -0500 Subject: [PATCH 04/13] Delete requirements.txt --- requirements.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 6a3f1164..00000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pip install pytest-cov -pytest --cov=./ --cov-report=xml From ad6974e24a0ddd05caf05862f8e4f261e94b9ced Mon Sep 17 00:00:00 2001 From: Dihooker <83437674+Dihooker@users.noreply.github.com> Date: Fri, 17 Dec 2021 22:03:58 -0500 Subject: [PATCH 05/13] Update config.yml --- .circleci/config.yml | 65 ++++++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 62d939b5..bd0af91f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,26 +1,45 @@ -version: 2.1 -orb: - codecov: codecov/codecov@3.0.0 - - -jobs: - build: - docker: - - image: cimg/python:3.9.6 - steps: - - checkout +version: 2 +jobs: # A basic unit of work in a run + build: # runs not using Workflows must have a `build` job as entry point + # directory where steps are run + working_directory: ~/circleci-demo-python-django + docker: # run the steps with Docker + # CircleCI Python images available at: https://hub.docker.com/r/circleci/python/ + - image: circleci/python:3.6.4 + auth: + username: mydockerhub-user + password: $DOCKERHUB_PASSWORD # context / project UI env-var reference + environment: # environment variables for primary container + PIPENV_VENV_IN_PROJECT: true + DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable + # CircleCI PostgreSQL images available at: https://hub.docker.com/r/circleci/postgres/ + - image: circleci/postgres:9.6.2 + auth: + username: mydockerhub-user + password: $DOCKERHUB_PASSWORD # context / project UI env-var reference + environment: # environment variables for the Postgres container. + POSTGRES_USER: root + POSTGRES_DB: circle_test + steps: # steps that comprise the `build` job + - checkout # check out source code to working directory + - run: sudo chown -R circleci:circleci /usr/local/bin + - run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages + - restore_cache: + # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ + key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }} - run: - name: Install dependencies - command: pip install -r requirements.txt + command: | + sudo pip install pipenv + pipenv install + - save_cache: # cache Python dependencies using checksum of Pipfile as the cache-key + key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }} + paths: + - "venv" - run: - name: Run tests and collect coverage command: | - coverage run tests.py - coverage xml - - -workflow: - version: 2.1 - build-test: - jobs: - - build + pipenv run python manage.py test + - store_test_results: # Upload test results for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/ + path: test-results + - store_artifacts: # Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/ + path: test-results + destination: tr1 From 61ceed7bc6e8506b0c84994147dfd6ad779298be Mon Sep 17 00:00:00 2001 From: Dihooker <83437674+Dihooker@users.noreply.github.com> Date: Fri, 17 Dec 2021 22:06:09 -0500 Subject: [PATCH 06/13] Update config.yml --- .circleci/config.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bd0af91f..a0f9b139 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,13 +13,7 @@ jobs: # A basic unit of work in a run PIPENV_VENV_IN_PROJECT: true DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable # CircleCI PostgreSQL images available at: https://hub.docker.com/r/circleci/postgres/ - - image: circleci/postgres:9.6.2 - auth: - username: mydockerhub-user - password: $DOCKERHUB_PASSWORD # context / project UI env-var reference - environment: # environment variables for the Postgres container. - POSTGRES_USER: root - POSTGRES_DB: circle_test + steps: # steps that comprise the `build` job - checkout # check out source code to working directory - run: sudo chown -R circleci:circleci /usr/local/bin From 58a71c7815fc9028def4bff4f351ecdc086ab6f9 Mon Sep 17 00:00:00 2001 From: Dihooker <83437674+Dihooker@users.noreply.github.com> Date: Fri, 17 Dec 2021 22:08:05 -0500 Subject: [PATCH 07/13] Update config.yml --- .circleci/config.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a0f9b139..902598f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: # A basic unit of work in a run build: # runs not using Workflows must have a `build` job as entry point # directory where steps are run - working_directory: ~/circleci-demo-python-django + docker: # run the steps with Docker # CircleCI Python images available at: https://hub.docker.com/r/circleci/python/ - image: circleci/python:3.6.4 @@ -29,9 +29,7 @@ jobs: # A basic unit of work in a run key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }} paths: - "venv" - - run: - command: | - pipenv run python manage.py test + - store_test_results: # Upload test results for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/ path: test-results - store_artifacts: # Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/ From 4ee759d665938ce637e78bd884271cd71ed51574 Mon Sep 17 00:00:00 2001 From: Dihooker <83437674+Dihooker@users.noreply.github.com> Date: Thu, 27 Jan 2022 01:08:52 -0500 Subject: [PATCH 08/13] Update tests.py --- tests.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests.py b/tests.py index 92aa2034..afe092c7 100644 --- a/tests.py +++ b/tests.py @@ -1,7 +1,5 @@ import unittest -import awesome - class TestMethods(unittest.TestCase): def test_add(self): From 9c887fd6daa42fa3a17b0f7f212bd18b5e74c4b2 Mon Sep 17 00:00:00 2001 From: Dihooker <83437674+Dihooker@users.noreply.github.com> Date: Wed, 31 Dec 2025 17:11:55 -0500 Subject: [PATCH 09/13] Fix syntax error in test_add method --- tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.py b/tests.py index afe092c7..82848229 100644 --- a/tests.py +++ b/tests.py @@ -2,7 +2,7 @@ class TestMethods(unittest.TestCase): - def test_add(self): + def test_add(self self.assertEqual(awesome.smile(), ":)") From 7c7ff74564ccd838a7bdd133e3f78ae647004ed6 Mon Sep 17 00:00:00 2001 From: Dihooker <83437674+Dihooker@users.noreply.github.com> Date: Wed, 31 Dec 2025 17:16:30 -0500 Subject: [PATCH 10/13] Fix syntax error in test_add method --- tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.py b/tests.py index 82848229..afe092c7 100644 --- a/tests.py +++ b/tests.py @@ -2,7 +2,7 @@ class TestMethods(unittest.TestCase): - def test_add(self + def test_add(self): self.assertEqual(awesome.smile(), ":)") From 1bba30ffaade5b5692cd03d3c16ccb6e78d098aa Mon Sep 17 00:00:00 2001 From: Dihooker <83437674+Dihooker@users.noreply.github.com> Date: Wed, 31 Dec 2025 17:26:19 -0500 Subject: [PATCH 11/13] Update tests.py From e0e3a0eb819e44aca1bb7f75a9e9f80a09b83d04 Mon Sep 17 00:00:00 2001 From: Dihooker <83437674+Dihooker@users.noreply.github.com> Date: Wed, 31 Dec 2025 17:44:06 -0500 Subject: [PATCH 12/13] Import awesome module in tests.py --- tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.py b/tests.py index afe092c7..75d8e3e1 100644 --- a/tests.py +++ b/tests.py @@ -1,6 +1,6 @@ import unittest - +import awesome class TestMethods(unittest.TestCase): def test_add(self): self.assertEqual(awesome.smile(), ":)") From 2f97e550cfb80c090668c7e93c3a3d8917532cc5 Mon Sep 17 00:00:00 2001 From: Dihooker <83437674+Dihooker@users.noreply.github.com> Date: Wed, 31 Dec 2025 17:59:54 -0500 Subject: [PATCH 13/13] Remove tests for awesome module --- tests.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests.py b/tests.py index 75d8e3e1..10e61596 100644 --- a/tests.py +++ b/tests.py @@ -1,10 +1 @@ import unittest - -import awesome -class TestMethods(unittest.TestCase): - def test_add(self): - self.assertEqual(awesome.smile(), ":)") - - -if __name__ == '__main__': - unittest.main()