From f46df292aa79abdcd6694c8979d0b70c40a50d0d Mon Sep 17 00:00:00 2001 From: Babl00 <46667985+Babl00@users.noreply.github.com> Date: Thu, 14 Sep 2023 10:19:14 +0530 Subject: [PATCH 1/6] Add .circleci/config.yml --- .circleci/config.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..4175da6 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,26 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/configuration-reference +version: 2.1 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/configuration-reference/#jobs +jobs: + say-hello: + # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/configuration-reference/#executor-job + docker: + - image: cimg/base:stable + # Add steps to the job + # See: https://circleci.com/docs/configuration-reference/#steps + steps: + - checkout + - run: + name: "Say hello" + command: "echo Hello, World!" + +# Orchestrate jobs using workflows +# See: https://circleci.com/docs/configuration-reference/#workflows +workflows: + say-hello-workflow: + jobs: + - say-hello From 7fdcd3309fd28e3781ce3110a2ab0746e3786386 Mon Sep 17 00:00:00 2001 From: Babl00 <46667985+Babl00@users.noreply.github.com> Date: Thu, 14 Sep 2023 10:44:19 +0530 Subject: [PATCH 2/6] Update config.yml --- .circleci/config.yml | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4175da6..b0609ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,25 +2,41 @@ # See: https://circleci.com/docs/configuration-reference version: 2.1 +# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects. +# See: https://circleci.com/docs/orb-intro/ +orbs: + # The python orb contains a set of prepackaged CircleCI configuration you can use repeatedly in your configuration files + # Orb commands and jobs help you with common scripting around a language/tool + # so you dont have to copy and paste it everywhere. + # See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python + python: circleci/python@1.5.0 + # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/configuration-reference/#jobs jobs: - say-hello: - # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/configuration-reference/#executor-job + build-and-test: # This is the name of the job, feel free to change it to better match what you're trying to do! + # These next lines defines a Docker executors: https://circleci.com/docs/executor-types/ + # You can specify an image from Dockerhub or use one of the convenience images from CircleCI's Developer Hub + # A list of available CircleCI Docker convenience images are available here: https://circleci.com/developer/images/image/cimg/python + # The executor is the environment in which the steps below will be executed - below will use a python 3.10.2 container + # Change the version below to your required version of python docker: - - image: cimg/base:stable - # Add steps to the job - # See: https://circleci.com/docs/configuration-reference/#steps + - image: cimg/python:3.10.2 + # Checkout the code as the first step. This is a dedicated CircleCI step. + # The python orb's install-packages step will install the dependencies from a Pipfile via Pipenv by default. + # Here we're making sure we use just use the system-wide pip. By default it uses the project root's requirements.txt. + # Then run your tests! + # CircleCI will report the results back to your VCS provider. steps: - checkout - - run: - name: "Say hello" - command: "echo Hello, World!" + - python/install-packages: + command: pip install qrcode + command: python3 QR_code_generator.py -# Orchestrate jobs using workflows +# Invoke jobs via workflows # See: https://circleci.com/docs/configuration-reference/#workflows workflows: - say-hello-workflow: + sample: # This is the name of the workflow, feel free to change it to better match your workflow. + # Inside the workflow, you define the jobs you want to run. jobs: - - say-hello + - build-and-test From 621cca4a3000f64d8b4e47a1cccff585e20e6b08 Mon Sep 17 00:00:00 2001 From: Babl00 <46667985+Babl00@users.noreply.github.com> Date: Thu, 14 Sep 2023 10:53:19 +0530 Subject: [PATCH 3/6] Update config.yml --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b0609ba..ddacde6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,11 @@ jobs: steps: - checkout - python/install-packages: - command: pip install qrcode + pkg-manager: pip install qrcode + + - run: + name: Run + # This assumes pytest is installed via the install-package step above command: python3 QR_code_generator.py # Invoke jobs via workflows From 04c64c2a9d3c7054328b96c7e49baf6020ba6c8c Mon Sep 17 00:00:00 2001 From: Babl00 <46667985+Babl00@users.noreply.github.com> Date: Thu, 14 Sep 2023 10:54:39 +0530 Subject: [PATCH 4/6] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ddacde6..7e4896b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,7 @@ jobs: steps: - checkout - python/install-packages: - pkg-manager: pip install qrcode + pkg-manager: pip - run: name: Run From 88f74af27d7ea82beaaa6c4da79c1e18c7fc5dc3 Mon Sep 17 00:00:00 2001 From: Babl00 <46667985+Babl00@users.noreply.github.com> Date: Thu, 14 Sep 2023 10:56:51 +0530 Subject: [PATCH 5/6] Create requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ + From 2310e74251f881a5c97dcc5bab8fad69f413e21a Mon Sep 17 00:00:00 2001 From: Babl00 <46667985+Babl00@users.noreply.github.com> Date: Thu, 14 Sep 2023 11:03:08 +0530 Subject: [PATCH 6/6] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8b13789..15aaeb3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ - +qrcode