From 406d0c8aea84df11b8d0823623176c3f6905206e Mon Sep 17 00:00:00 2001 From: Jan Soft <113185323+softacoder@users.noreply.github.com> Date: Mon, 2 Oct 2023 13:00:10 +0100 Subject: [PATCH 1/8] Update mandatory-tests.yml Step 1. Cloud course week 2 --- .github/workflows/mandatory-tests.yml | 28 ++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/mandatory-tests.yml b/.github/workflows/mandatory-tests.yml index 253abb1b5..f00fcc0de 100644 --- a/.github/workflows/mandatory-tests.yml +++ b/.github/workflows/mandatory-tests.yml @@ -1,11 +1,25 @@ -name: Run mandatory tests -on: pull_request +# Step 1 +name: CI + +on: [push] + jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install modules - run: npm install - - name: Run mandatory tests - run: npm test -- --selectProjects mandatory + - name: Checkout code + uses: actions/checkout@v3 + +# Original code +# name: Run mandatory tests +# on: pull_request +# jobs: +# build: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2 +# - name: Install modules +# run: npm install +# - name: Run mandatory tests +# run: npm test -- --selectProjects mandatory + From e765f7338364a04bc9272d4848f4098e1ca44a91 Mon Sep 17 00:00:00 2001 From: Jan Soft <113185323+softacoder@users.noreply.github.com> Date: Mon, 2 Oct 2023 13:37:37 +0100 Subject: [PATCH 2/8] Update mandatory-tests.yml # Step 2 Adding Testing Stages --- .github/workflows/mandatory-tests.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mandatory-tests.yml b/.github/workflows/mandatory-tests.yml index f00fcc0de..24586f4f9 100644 --- a/.github/workflows/mandatory-tests.yml +++ b/.github/workflows/mandatory-tests.yml @@ -1,14 +1,31 @@ -# Step 1 +# Step 2 Adding Testing Stages name: CI on: [push] jobs: - build: + test: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 + - name: Install Dependencies + run: npm install + - name: Run tests + run: npm test + + +# Step 1 Setting up a Simple Workflow +# name: CI + +# on: [push] + +# jobs: +# build: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 # Original code # name: Run mandatory tests From a9dec7b14664fba10156db7726e4af3879e07d01 Mon Sep 17 00:00:00 2001 From: Jan Soft <113185323+softacoder@users.noreply.github.com> Date: Mon, 2 Oct 2023 14:09:30 +0100 Subject: [PATCH 3/8] Update mandatory-tests.yml Step 3 Adding Deployment Stages --- .github/workflows/mandatory-tests.yml | 43 ++++++++++++++++++++------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/.github/workflows/mandatory-tests.yml b/.github/workflows/mandatory-tests.yml index 24586f4f9..a604aa646 100644 --- a/.github/workflows/mandatory-tests.yml +++ b/.github/workflows/mandatory-tests.yml @@ -1,18 +1,41 @@ -# Step 2 Adding Testing Stages -name: CI - -on: [push] +# Step 3 Adding Deployment Stages +name: CI/CD +on: + push: + jobs: test: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Install Dependencies - run: npm install - - name: Run tests - run: npm test + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Dependencies + run: npm install + - name: Run tests + run: npm test + + deploy: + runs-on: ubuntu-latest + steps: + - name: Deploy + run: npm deploy + +# Step 2 Adding Testing Stages +# name: CI + +# on: [push] + +# jobs: +# test: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# - name: Install Dependencies +# run: npm install +# - name: Run tests +# run: npm test # Step 1 Setting up a Simple Workflow From 2e2fedf11e5d1822f1e7a7eb21270d04c8f4875b Mon Sep 17 00:00:00 2001 From: Jan Soft <113185323+softacoder@users.noreply.github.com> Date: Mon, 2 Oct 2023 14:43:52 +0100 Subject: [PATCH 4/8] Update mandatory-tests.yml Step 4 Creating a Workflow with Multiple Jobs --- .github/workflows/mandatory-tests.yml | 51 ++++++++++++++++++++------- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/.github/workflows/mandatory-tests.yml b/.github/workflows/mandatory-tests.yml index a604aa646..027df9e2d 100644 --- a/.github/workflows/mandatory-tests.yml +++ b/.github/workflows/mandatory-tests.yml @@ -1,25 +1,50 @@ -# Step 3 Adding Deployment Stages -name: CI/CD +# Step 4 Creating a Workflow with Multiple Jobs +name: CI/CD Pipeline + +on: [push] -on: - push: - jobs: test: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Install Dependencies - run: npm install - - name: Run tests - run: npm test + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Dependencies + run: npm install + - name: Run tests + run: npm test deploy: + needs: test runs-on: ubuntu-latest steps: - - name: Deploy - run: npm deploy + - name: Checkout code + uses: actions/checkout@v3 + - name: Deploy + run: npm deploy + +# Step 3 Adding Deployment Stages +# name: CI/CD + +# on: +# push: + +# jobs: +# test: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# - name: Install Dependencies +# run: npm install +# - name: Run tests +# run: npm test + +# deploy: +# runs-on: ubuntu-latest +# steps: +# - name: Deploy +# run: npm deploy # Step 2 Adding Testing Stages # name: CI From b8dac1416535433f7028ca30d1269ad23f098354 Mon Sep 17 00:00:00 2001 From: Jan Soft <113185323+softacoder@users.noreply.github.com> Date: Mon, 2 Oct 2023 14:58:29 +0100 Subject: [PATCH 5/8] Update mandatory-tests.yml # Step 5 Github Environment Variables --- .github/workflows/mandatory-tests.yml | 56 ++++++++++++++++++++------- 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/.github/workflows/mandatory-tests.yml b/.github/workflows/mandatory-tests.yml index 027df9e2d..4c02eb356 100644 --- a/.github/workflows/mandatory-tests.yml +++ b/.github/workflows/mandatory-tests.yml @@ -1,27 +1,57 @@ -# Step 4 Creating a Workflow with Multiple Jobs +# Step 5 Github Environment Variables name: CI/CD Pipeline -on: [push] - +on: + push: + jobs: test: runs-on: ubuntu-latest + env: + NODE_ENV: test steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Install Dependencies - run: npm install - - name: Run tests - run: npm test + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Dependencies + run: npm install + - name: Run tests + run: npm test deploy: needs: test runs-on: ubuntu-latest + env: + NODE_ENV: production steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Deploy - run: npm deploy + - name: Checkout code + uses: actions/checkout@v3 + - name: Deploy + run: npm deploy + +# Step 4 Creating a Workflow with Multiple Jobs +# name: CI/CD Pipeline + +# on: [push] + +# jobs: +# test: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# - name: Install Dependencies +# run: npm install +# - name: Run tests +# run: npm test + +# deploy: +# needs: test +# runs-on: ubuntu-latest +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# - name: Deploy +# run: npm deploy # Step 3 Adding Deployment Stages # name: CI/CD From ee142d543d286b4d6973899e7f73b209a5c42b2c Mon Sep 17 00:00:00 2001 From: Jan Soft <113185323+softacoder@users.noreply.github.com> Date: Mon, 2 Oct 2023 15:06:32 +0100 Subject: [PATCH 6/8] Update mandatory-tests.yml # Step 6 Github Secrets https://main--cyf-cloud-track.netlify.app/cloud/weeks/2/week-plan/ --- .github/workflows/mandatory-tests.yml | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/mandatory-tests.yml b/.github/workflows/mandatory-tests.yml index 4c02eb356..184f83ab3 100644 --- a/.github/workflows/mandatory-tests.yml +++ b/.github/workflows/mandatory-tests.yml @@ -1,3 +1,41 @@ +# Step 6 Github Secrets +name: CI/CD Pipeline + +on: + push: + +jobs: + test: + runs-on: ubuntu-latest + env: + NODE_ENV: test + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Dependencies + run: npm install + - name: Run tests + run: npm test + + deploy: + needs: test + runs-on: ubuntu-latest + env: + NODE_ENV: production + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Deploy + env: + API_KEY: ${{ secrets.API_KEY }} # Access the secret here + run: | + # Use the API_KEY secret in your deployment script + echo "Deploying with API key: $API_KEY" + # Replace the following line with your actual deployment command + # For example: npm deploy + echo "Deployment command here" + + # Step 5 Github Environment Variables name: CI/CD Pipeline From 2128d56d97fa9f76e659f31a0217a5f3d357a062 Mon Sep 17 00:00:00 2001 From: Jan Soft <113185323+softacoder@users.noreply.github.com> Date: Mon, 2 Oct 2023 15:07:43 +0100 Subject: [PATCH 7/8] Update mandatory-tests.yml Forgot to unmark step 5. https://main--cyf-cloud-track.netlify.app/cloud/weeks/2/week-plan/ --- .github/workflows/mandatory-tests.yml | 50 +++++++++++++-------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/mandatory-tests.yml b/.github/workflows/mandatory-tests.yml index 184f83ab3..16723335e 100644 --- a/.github/workflows/mandatory-tests.yml +++ b/.github/workflows/mandatory-tests.yml @@ -37,34 +37,34 @@ jobs: # Step 5 Github Environment Variables -name: CI/CD Pipeline +# name: CI/CD Pipeline -on: - push: +# on: +# push: -jobs: - test: - runs-on: ubuntu-latest - env: - NODE_ENV: test - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Install Dependencies - run: npm install - - name: Run tests - run: npm test +# jobs: +# test: +# runs-on: ubuntu-latest +# env: +# NODE_ENV: test +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# - name: Install Dependencies +# run: npm install +# - name: Run tests +# run: npm test - deploy: - needs: test - runs-on: ubuntu-latest - env: - NODE_ENV: production - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Deploy - run: npm deploy +# deploy: +# needs: test +# runs-on: ubuntu-latest +# env: +# NODE_ENV: production +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# - name: Deploy +# run: npm deploy # Step 4 Creating a Workflow with Multiple Jobs # name: CI/CD Pipeline From 7ab4ee534e23f85c1b130ca88d4819666fd37c61 Mon Sep 17 00:00:00 2001 From: Jan Soft <113185323+softacoder@users.noreply.github.com> Date: Wed, 4 Oct 2023 19:51:26 +0100 Subject: [PATCH 8/8] buddygroup change 1 --- .github/workflows/mandatory-tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/mandatory-tests.yml b/.github/workflows/mandatory-tests.yml index 16723335e..7ca9ff81c 100644 --- a/.github/workflows/mandatory-tests.yml +++ b/.github/workflows/mandatory-tests.yml @@ -1,8 +1,7 @@ # Step 6 Github Secrets name: CI/CD Pipeline -on: - push: +on: [push] jobs: test: