From dbb5218f6051d665644146c22664f31a2269db46 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Fri, 28 Feb 2025 20:00:42 +0000 Subject: [PATCH 01/29] firstchange --- .github/workflows/CICD.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/workflows/CICD.yml diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml new file mode 100644 index 0000000..a1d85b3 --- /dev/null +++ b/.github/workflows/CICD.yml @@ -0,0 +1,9 @@ +name: Continuous Integration +on: [push] # Will make the workflow run every time you push to any branch + +jobs: + build: + name: Build and test + runs-on: ubuntu-latest # Sets the build environment a machine with the latest Ubuntu installed + steps: + - uses: actions/checkout@v4 # Adds a step to checkout the repository code \ No newline at end of file From cef433fe04226a52647fe89586f326679bd67706 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Fri, 28 Feb 2025 20:04:39 +0000 Subject: [PATCH 02/29] secondrun --- .github/workflows/CICD.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index a1d85b3..aecf634 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -1,9 +1,12 @@ name: Continuous Integration -on: [push] # Will make the workflow run every time you push to any branch +on: [push] jobs: build: name: Build and test - runs-on: ubuntu-latest # Sets the build environment a machine with the latest Ubuntu installed + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 # Adds a step to checkout the repository code \ No newline at end of file + - uses: actions/checkout@v4 + + - name: Hello world # Name of step + run: echo 'Hello world' # Command to run \ No newline at end of file From ab496da32078fef12d93d9443f12cc6ff24a836f Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Fri, 28 Feb 2025 20:07:26 +0000 Subject: [PATCH 03/29] third --- .github/workflows/CICD.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index aecf634..d77516b 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -9,4 +9,6 @@ jobs: - uses: actions/checkout@v4 - name: Hello world # Name of step - run: echo 'Hello world' # Command to run \ No newline at end of file + uses: actions/hello-world-javascript-action@v1.1 # Name of the action. This uses https://github.com/actions/hello-world-javascript-action + with: # This section is needed if you need to pass arguments to the action + who-to-greet: 'Mona the Octocat' \ No newline at end of file From 1995062011df05077e3e9f26b9b1322fef7f648f Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Fri, 28 Feb 2025 20:10:27 +0000 Subject: [PATCH 04/29] fourth --- .github/workflows/CICD.yml | 62 ++++++++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index d77516b..4a578e4 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -1,14 +1,58 @@ -name: Continuous Integration -on: [push] +name: CI Workflow + +on: + push: + branches: + - main + pull_request: + branches: + - main jobs: build: - name: Build and test - runs-on: ubuntu-latest + runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment + steps: - - uses: actions/checkout@v4 + # Step 1: Check out the code + - name: Checkout repository + uses: actions/checkout@v2 + + # Step 2: Set up .NET + - name: Set up .NET + uses: actions/setup-dotnet@v2 + with: + dotnet-version: '6.0' # Specify the .NET version you're using (e.g., '6.0', '7.0') + + # Step 3: Restore C# dependencies + - name: Restore .NET dependencies + run: dotnet restore + + # Step 4: Build C# code + - name: Build .NET project + run: dotnet build --configuration Release + + # Step 5: Run C# tests + - name: Run .NET tests + run: dotnet test --configuration Release --no-build --verbosity normal + + # Step 6: Set up Node.js for TypeScript + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' # Specify the Node.js version you want to use + + # Step 7: Install Node.js dependencies + - name: Install dependencies (npm) + run: npm install + + # Step 8: Build TypeScript code + - name: Build TypeScript project + run: npm run build # Make sure this command is defined in your package.json + + # Step 9: Run TypeScript linter (Assuming you have ESLint configured) + - name: Run TypeScript linter + run: npm run lint # Make sure this command is defined in your package.json - - name: Hello world # Name of step - uses: actions/hello-world-javascript-action@v1.1 # Name of the action. This uses https://github.com/actions/hello-world-javascript-action - with: # This section is needed if you need to pass arguments to the action - who-to-greet: 'Mona the Octocat' \ No newline at end of file + # Step 10: Run TypeScript tests (Assuming you are using a test framework like Jest) + - name: Run TypeScript tests + run: npm test # Make sure this command is defined in your package.json From df2eae3e9a8b34e4a53aba1b5a83e3132a54ea9a Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Fri, 28 Feb 2025 20:13:57 +0000 Subject: [PATCH 05/29] corrected_dotnet --- .github/workflows/CICD.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 4a578e4..598520e 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -17,11 +17,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - # Step 2: Set up .NET - - name: Set up .NET + # Step 2: Set up .NET 8.0 SDK + - name: Set up .NET 8.0 uses: actions/setup-dotnet@v2 with: - dotnet-version: '6.0' # Specify the .NET version you're using (e.g., '6.0', '7.0') + dotnet-version: '8.0.x' # Specify the .NET 8.0 version you're using (this will install the latest .NET 8.0 version) # Step 3: Restore C# dependencies - name: Restore .NET dependencies From 7e1551bf4245af78fc85f2694d42933fea3d0cb7 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Fri, 28 Feb 2025 20:25:30 +0000 Subject: [PATCH 06/29] corrected_dotnetv2 --- .github/{workflows => workflow}/CICD.yml | 4 ++++ 1 file changed, 4 insertions(+) rename .github/{workflows => workflow}/CICD.yml (92%) diff --git a/.github/workflows/CICD.yml b/.github/workflow/CICD.yml similarity index 92% rename from .github/workflows/CICD.yml rename to .github/workflow/CICD.yml index 598520e..a789009 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflow/CICD.yml @@ -22,6 +22,10 @@ jobs: uses: actions/setup-dotnet@v2 with: dotnet-version: '8.0.x' # Specify the .NET 8.0 version you're using (this will install the latest .NET 8.0 version) + + - name: Search for package.json + run: find /home/runner/work/DevOps-Unit-5-Workshop/DevOps-Unit-5-Workshop/ -name "package.json" + # Step 3: Restore C# dependencies - name: Restore .NET dependencies From 87a96189fa98be859bd8fc5b77fd990eae63ffa6 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Fri, 28 Feb 2025 20:29:55 +0000 Subject: [PATCH 07/29] v3 --- .github/workflow/CICD.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index a789009..c438555 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -26,7 +26,6 @@ jobs: - name: Search for package.json run: find /home/runner/work/DevOps-Unit-5-Workshop/DevOps-Unit-5-Workshop/ -name "package.json" - # Step 3: Restore C# dependencies - name: Restore .NET dependencies run: dotnet restore From ad11a0eb59aa2a3ce979eb35dafe4646e40fa68e Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Fri, 28 Feb 2025 20:35:22 +0000 Subject: [PATCH 08/29] corrected_dotnetv2 --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index c438555..d783c98 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -17,7 +17,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - # Step 2: Set up .NET 8.0 SDK + # Step 2: Set up .NET 8.0 SD - name: Set up .NET 8.0 uses: actions/setup-dotnet@v2 with: From cd9083b20b6de58e5aae933427d001dd805c6e7d Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Sat, 1 Mar 2025 18:27:06 +0000 Subject: [PATCH 09/29] pullresuesttest --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index d783c98..cebfbff 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -17,7 +17,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - # Step 2: Set up .NET 8.0 SD + # Step 2: Set up .NET 8.0 - name: Set up .NET 8.0 uses: actions/setup-dotnet@v2 with: From fff7019c08a2bfd10997753a90817b0e7bf16ebd Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Sun, 2 Mar 2025 00:02:39 +0000 Subject: [PATCH 10/29] commentchange --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index d783c98..048e793 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -38,7 +38,7 @@ jobs: - name: Run .NET tests run: dotnet test --configuration Release --no-build --verbosity normal - # Step 6: Set up Node.js for TypeScript + # Step 6: Set up Node.js for TypeScrip - name: Set up Node.js uses: actions/setup-node@v3 with: From 46d757c5e5f69f9adf3bbb035512da5a6923377e Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Sun, 2 Mar 2025 00:09:50 +0000 Subject: [PATCH 11/29] newchange --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index 048e793..f9c691c 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -30,7 +30,7 @@ jobs: - name: Restore .NET dependencies run: dotnet restore - # Step 4: Build C# code + # Step 4: Build C# - name: Build .NET project run: dotnet build --configuration Release From a3c6eaa3ebd5bef4e2552e1872c821dcb2e84383 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Sun, 2 Mar 2025 00:16:12 +0000 Subject: [PATCH 12/29] newchange --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index f9c691c..781a18f 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -34,7 +34,7 @@ jobs: - name: Build .NET project run: dotnet build --configuration Release - # Step 5: Run C# tests + # Step 5: Run C# - name: Run .NET tests run: dotnet test --configuration Release --no-build --verbosity normal From 0a3239697c7a55f7ff43be0fd11b46c4729ceeec Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Mon, 3 Mar 2025 14:02:05 +0000 Subject: [PATCH 13/29] parellelcandtypescript --- .github/workflow/CICD.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index 048e793..2bc7f3f 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -9,7 +9,8 @@ on: - main jobs: - build: + + build-csharp: runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment steps: @@ -38,6 +39,10 @@ jobs: - name: Run .NET tests run: dotnet test --configuration Release --no-build --verbosity normal + build-typescript: + runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment + + steps: # Step 6: Set up Node.js for TypeScrip - name: Set up Node.js uses: actions/setup-node@v3 From 5be5454f5d7fd19845b6304d3d400c65960db254 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Mon, 3 Mar 2025 14:07:24 +0000 Subject: [PATCH 14/29] parellelcandtypescript --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index a70cb44..eb5abb5 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -10,7 +10,7 @@ on: jobs: - build-csharp: + build-csharpscript: runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment steps: From 69e614c00b9b2b0073738daa2fc366cfdf39b028 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Mon, 3 Mar 2025 14:09:44 +0000 Subject: [PATCH 15/29] parellelcandtypescript --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index eb5abb5..6f4c765 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -39,7 +39,7 @@ jobs: - name: Run .NET tests run: dotnet test --configuration Release --no-build --verbosity normal - build-typescript: + build-typescript_2: runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment steps: From 56e928fd06c147c098615dd726b2af20b7832454 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Mon, 3 Mar 2025 14:56:55 +0000 Subject: [PATCH 16/29] updated_csharpscipt_new --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index eb5abb5..db1fb03 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -10,7 +10,7 @@ on: jobs: - build-csharpscript: + build-csharpscript_new: runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment steps: From c2bc677197f74840d0cee699c39cf66d8c707e0a Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Mon, 3 Mar 2025 15:06:51 +0000 Subject: [PATCH 17/29] lastcomment --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index db1fb03..e2e180d 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -10,7 +10,7 @@ on: jobs: - build-csharpscript_new: + build-csharpscript_new100: runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment steps: From 223bf1a85b26fd68214e9f68437a77be65fe8c40 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Mon, 3 Mar 2025 15:11:00 +0000 Subject: [PATCH 18/29] pushtomain --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index 9227a63..d2f59d6 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -10,7 +10,7 @@ on: jobs: - build-csharpscript_new: + build-csharpscript_new1: runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment steps: From 6b826e287f3ca10f21c502e174d9cc8011d4789a Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Mon, 3 Mar 2025 15:14:03 +0000 Subject: [PATCH 19/29] pushtomain_23 --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index d2f59d6..3560f41 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -10,7 +10,7 @@ on: jobs: - build-csharpscript_new1: + build-csharpscript_new12: runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment steps: From 19b83800e0fe0ccff8862fe85ded15604acbb681 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Mon, 3 Mar 2025 15:43:10 +0000 Subject: [PATCH 20/29] pushtomain_234 --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index 3560f41..ffc1bfc 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -10,7 +10,7 @@ on: jobs: - build-csharpscript_new12: + build-csharpscript_new123: runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment steps: From 0758be8c5afcb5d7bff333bdec62b91fcc2ed32a Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Mon, 3 Mar 2025 15:45:42 +0000 Subject: [PATCH 21/29] pushtomain_2345 --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index ffc1bfc..f1c1684 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -10,7 +10,7 @@ on: jobs: - build-csharpscript_new123: + build-csharpscript_new12345: runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment steps: From abecfb37943bc75081467290aafd806df5ff1247 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Mon, 3 Mar 2025 16:28:00 +0000 Subject: [PATCH 22/29] additingslack --- .github/workflow/CICD.yml | 111 ++++++++++++++++++++------------------ 1 file changed, 60 insertions(+), 51 deletions(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index f1c1684..90455c3 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -9,58 +9,67 @@ on: - main jobs: - - build-csharpscript_new12345: - runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment + build-csharp: + runs-on: ubuntu-latest steps: - # Step 1: Check out the code - - name: Checkout repository - uses: actions/checkout@v2 - - # Step 2: Set up .NET 8.0 - - name: Set up .NET 8.0 - uses: actions/setup-dotnet@v2 - with: - dotnet-version: '8.0.x' # Specify the .NET 8.0 version you're using (this will install the latest .NET 8.0 version) - - - name: Search for package.json - run: find /home/runner/work/DevOps-Unit-5-Workshop/DevOps-Unit-5-Workshop/ -name "package.json" - - # Step 3: Restore C# dependencies - - name: Restore .NET dependencies - run: dotnet restore - - # Step 4: Build C# - - name: Build .NET project - run: dotnet build --configuration Release - - # Step 5: Run C# - - name: Run .NET tests - run: dotnet test --configuration Release --no-build --verbosity normal - - build-typescript_2: - runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up .NET 8.0 SDK + uses: actions/setup-dotnet@v2 + with: + dotnet-version: '8.0.x' + + - name: Restore .NET dependencies + run: dotnet restore + + - name: Build .NET project + run: dotnet build --configuration Release + + - name: Run .NET tests + run: dotnet test --configuration Release --no-build --verbosity normal + + build-typescript: + runs-on: ubuntu-latest steps: - # Step 6: Set up Node.js for TypeScrip - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '16' # Specify the Node.js version you want to use - - # Step 7: Install Node.js dependencies - - name: Install dependencies (npm) - run: npm install - - # Step 8: Build TypeScript code - - name: Build TypeScript project - run: npm run build # Make sure this command is defined in your package.json - - # Step 9: Run TypeScript linter (Assuming you have ESLint configured) - - name: Run TypeScript linter - run: npm run lint # Make sure this command is defined in your package.json - - # Step 10: Run TypeScript tests (Assuming you are using a test framework like Jest) - - name: Run TypeScript tests - run: npm test # Make sure this command is defined in your package.json + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js for TypeScript + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Install dependencies (npm) + run: npm install + + - name: Build TypeScript project + run: npm run build + + - name: Run TypeScript linter + run: npm run lint + + - name: Run TypeScript tests + run: npm test + + notify: + runs-on: ubuntu-latest + needs: [build-csharp, build-typescript] # Ensure the notify job runs after the others + + steps: + - name: Send Slack notification (on success) + if: success() + run: | + curl -X POST -H 'Content-type: application/json' --data '{"text":"🚀 CI Workflow succeeded! :tada:"}' ${{ secrets.SLACK_WEBHOOK_URL }} + + - name: Send Slack notification (on failure) + if: failure() + run: | + curl -X POST -H 'Content-type: application/json' --data '{"text":"❌ CI Workflow failed! Please check the build logs."}' ${{ secrets.SLACK_WEBHOOK_URL }} + + - name: Send Slack notification (on cancel) + if: cancelled() + run: | + curl -X POST -H 'Content-type: application/json' --data '{"text":"⚠️ CI Workflow was cancelled."}' ${{ secrets.SLACK_WEBHOOK_URL }} From d31c29b1511bb7fc0fcba626979ec695e37c756a Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Mon, 3 Mar 2025 16:48:03 +0000 Subject: [PATCH 23/29] additingslack2 --- .github/workflow/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index 90455c3..35a139c 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -9,7 +9,7 @@ on: - main jobs: - build-csharp: + build-csharp_new: runs-on: ubuntu-latest steps: From f51717132acbca9eb2933df3ce8e05b1166709c1 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Mon, 3 Mar 2025 16:52:41 +0000 Subject: [PATCH 24/29] new --- .github/workflow/CICD.yml | 111 ++++++++++++++++++++------------------ 1 file changed, 60 insertions(+), 51 deletions(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index 9ed94e9..90455c3 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -9,58 +9,67 @@ on: - main jobs: - - build-csharpscript_new100: - runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment + build-csharp: + runs-on: ubuntu-latest steps: - # Step 1: Check out the code - - name: Checkout repository - uses: actions/checkout@v2 - - # Step 2: Set up .NET 8.0 - - name: Set up .NET 8.0 - uses: actions/setup-dotnet@v2 - with: - dotnet-version: '8.0.x' # Specify the .NET 8.0 version you're using (this will install the latest .NET 8.0 version) - - - name: Search for package.json - run: find /home/runner/work/DevOps-Unit-5-Workshop/DevOps-Unit-5-Workshop/ -name "package.json" - - # Step 3: Restore C# dependencies - - name: Restore .NET dependencies - run: dotnet restore - - # Step 4: Build C# - - name: Build .NET project - run: dotnet build --configuration Release - - # Step 5: Run C# - - name: Run .NET tests - run: dotnet test --configuration Release --no-build --verbosity normal - - build-typescript_2: - runs-on: ubuntu-latest # You can change this to `windows-latest` or `macos-latest` depending on your environment + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up .NET 8.0 SDK + uses: actions/setup-dotnet@v2 + with: + dotnet-version: '8.0.x' + + - name: Restore .NET dependencies + run: dotnet restore + + - name: Build .NET project + run: dotnet build --configuration Release + + - name: Run .NET tests + run: dotnet test --configuration Release --no-build --verbosity normal + + build-typescript: + runs-on: ubuntu-latest steps: - # Step 6: Set up Node.js for TypeScrip - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '16' # Specify the Node.js version you want to use - - # Step 7: Install Node.js dependencies - - name: Install dependencies (npm) - run: npm install - - # Step 8: Build TypeScript code - - name: Build TypeScript project - run: npm run build # Make sure this command is defined in your package.json - - # Step 9: Run TypeScript linter (Assuming you have ESLint configured) - - name: Run TypeScript linter - run: npm run lint # Make sure this command is defined in your package.json - - # Step 10: Run TypeScript tests (Assuming you are using a test framework like Jest) - - name: Run TypeScript tests - run: npm test # Make sure this command is defined in your package.json + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js for TypeScript + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Install dependencies (npm) + run: npm install + + - name: Build TypeScript project + run: npm run build + + - name: Run TypeScript linter + run: npm run lint + + - name: Run TypeScript tests + run: npm test + + notify: + runs-on: ubuntu-latest + needs: [build-csharp, build-typescript] # Ensure the notify job runs after the others + + steps: + - name: Send Slack notification (on success) + if: success() + run: | + curl -X POST -H 'Content-type: application/json' --data '{"text":"🚀 CI Workflow succeeded! :tada:"}' ${{ secrets.SLACK_WEBHOOK_URL }} + + - name: Send Slack notification (on failure) + if: failure() + run: | + curl -X POST -H 'Content-type: application/json' --data '{"text":"❌ CI Workflow failed! Please check the build logs."}' ${{ secrets.SLACK_WEBHOOK_URL }} + + - name: Send Slack notification (on cancel) + if: cancelled() + run: | + curl -X POST -H 'Content-type: application/json' --data '{"text":"⚠️ CI Workflow was cancelled."}' ${{ secrets.SLACK_WEBHOOK_URL }} From 98a9d555a9d67b04320afe73132e9c6413878c7e Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Mon, 3 Mar 2025 17:10:19 +0000 Subject: [PATCH 25/29] _newslack --- .github/workflow/CICD.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index 90455c3..8c0c6e1 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -9,7 +9,7 @@ on: - main jobs: - build-csharp: + build-csharp_new: runs-on: ubuntu-latest steps: @@ -56,7 +56,7 @@ jobs: notify: runs-on: ubuntu-latest - needs: [build-csharp, build-typescript] # Ensure the notify job runs after the others + needs: [build-csharp_new, build-typescript] # Ensure the notify job runs after the others steps: - name: Send Slack notification (on success) From 3f29ad5d81284015f4888308df6e8e6cdc302bee Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Thu, 6 Mar 2025 11:17:46 +0000 Subject: [PATCH 26/29] newpushforslack --- .github/workflow/CICD.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index 8c0c6e1..00d454a 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -4,9 +4,9 @@ on: push: branches: - main - pull_request: - branches: - - main +# pull_request: + # branches: + # - main1 jobs: build-csharp_new: From 890cb950eee55c64319737c51b33185dbb846d5e Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Thu, 6 Mar 2025 11:23:58 +0000 Subject: [PATCH 27/29] newpushforslackv2 --- .github/workflow/CICD.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflow/CICD.yml b/.github/workflow/CICD.yml index 00d454a..287eaf7 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflow/CICD.yml @@ -4,9 +4,9 @@ on: push: branches: - main -# pull_request: - # branches: - # - main1 + #pull_request: + # branches: + # - main jobs: build-csharp_new: From b1403a78604e423c690db171adcc757fc5561c84 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Thu, 6 Mar 2025 15:55:24 +0000 Subject: [PATCH 28/29] newpushforslackv3 --- .github/{workflow => workflows}/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/{workflow => workflows}/CICD.yml (99%) diff --git a/.github/workflow/CICD.yml b/.github/workflows/CICD.yml similarity index 99% rename from .github/workflow/CICD.yml rename to .github/workflows/CICD.yml index 287eaf7..2012725 100644 --- a/.github/workflow/CICD.yml +++ b/.github/workflows/CICD.yml @@ -4,7 +4,7 @@ on: push: branches: - main - #pull_request: + #pull_request:aa # branches: # - main From 0af3537e7938af4f220033c4de46a0e3e8b8d294 Mon Sep 17 00:00:00 2001 From: Grv-madan <65107012+Grv-madan@users.noreply.github.com> Date: Thu, 6 Mar 2025 16:36:55 +0000 Subject: [PATCH 29/29] newpushforslackv4 --- .github/workflows/CICD.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 2012725..103978a 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -16,6 +16,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Set up .NET 8.0 SDK uses: actions/setup-dotnet@v2 with: @@ -43,15 +44,19 @@ jobs: node-version: '16' - name: Install dependencies (npm) + working-directory: ./DotnetTemplate.Web run: npm install - name: Build TypeScript project + working-directory: ./DotnetTemplate.Web run: npm run build - name: Run TypeScript linter + working-directory: ./DotnetTemplate.Web run: npm run lint - name: Run TypeScript tests + working-directory: ./DotnetTemplate.Web run: npm test notify: @@ -60,7 +65,7 @@ jobs: steps: - name: Send Slack notification (on success) - if: success() + if: success() run: | curl -X POST -H 'Content-type: application/json' --data '{"text":"🚀 CI Workflow succeeded! :tada:"}' ${{ secrets.SLACK_WEBHOOK_URL }}