From a20c25896b0a04963b27e38763cdf2538aa526f1 Mon Sep 17 00:00:00 2001 From: multimac59 Date: Mon, 26 Sep 2022 22:53:18 +0530 Subject: [PATCH 1/3] 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 000000000..6554e1f4e --- /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/2.0/configuration-reference +version: 2.1 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/2.0/configuration-reference/#jobs +jobs: + say-hello: + # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor + docker: + - image: cimg/base:stable + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps + steps: + - checkout + - run: + name: "Say hello" + command: "echo Hello, World!" + +# Invoke jobs via workflows +# See: https://circleci.com/docs/2.0/configuration-reference/#workflows +workflows: + say-hello-workflow: + jobs: + - say-hello From c131926758df5b3d5f5ceabbe1dc4c170f7ff28c Mon Sep 17 00:00:00 2001 From: multimac59 Date: Mon, 26 Sep 2022 23:12:38 +0530 Subject: [PATCH 2/3] changes in config file --- .circleci/config.yml | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6554e1f4e..62f7a8585 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,22 +5,35 @@ version: 2.1 # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: - say-hello: - # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor + build: docker: - - image: cimg/base:stable - # Add steps to the job - # See: https://circleci.com/docs/2.0/configuration-reference/#steps + - image: circleci/node:13.8.0 steps: - checkout - - run: - name: "Say hello" - command: "echo Hello, World!" + - run: npm run lint -# Invoke jobs via workflows -# See: https://circleci.com/docs/2.0/configuration-reference/#workflows + test: + docker: + - image: circleci/node:13.8.0 + steps: + - checkout + - run: npm i + - run: npm run test + + analyze: + docker: + - image: circleci/node:13.8.0 + steps: + - checkout + - run: npm i + - run: npm audit workflows: - say-hello-workflow: + ci_demo_wf: jobs: - - say-hello + - build + - test: + requires: + - build + - analyze: + requires: + - test From 79703a203f9c6cade5ebcc5b057249a17c245585 Mon Sep 17 00:00:00 2001 From: multimac59 Date: Mon, 26 Sep 2022 23:14:41 +0530 Subject: [PATCH 3/3] add dependency in build job --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 62f7a8585..653d9635c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ jobs: - image: circleci/node:13.8.0 steps: - checkout + - run: npm i - run: npm run lint test: @@ -25,7 +26,6 @@ jobs: - image: circleci/node:13.8.0 steps: - checkout - - run: npm i - run: npm audit workflows: ci_demo_wf: