From 01bf7fe1d33fec4d21fd9aafc3293931cb69bfa8 Mon Sep 17 00:00:00 2001 From: frodo-repo <134262496+frodo-repo@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:20:15 +0530 Subject: [PATCH 1/9] Update github-pipelines.yml --- .github/workflows/github-pipelines.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-pipelines.yml b/.github/workflows/github-pipelines.yml index 7e39a52a5..1da93abeb 100644 --- a/.github/workflows/github-pipelines.yml +++ b/.github/workflows/github-pipelines.yml @@ -15,14 +15,32 @@ jobs: with: fetch-depth: 5 # Fetch 5 commits worth of history - - name: Install Git and Curl + - name: Set up Git and Curl run: | sudo apt-get update sudo apt-get install -y git curl git --version # Verify Git installation curl --version # Verify curl installation + - name: Cache dependencies (Git & Curl) + uses: actions/cache@v2 + with: + path: | + /usr/bin/git + /usr/bin/curl + key: ${{ runner.os }}-git-curl-${{ hashFiles('**/*.sh') }} + restore-keys: | + ${{ runner.os }}-git-curl- + - name: Analyze Changes run: | - chmod +x analyze_changes.sh + chmod +x ./analyze_changes.sh ./analyze_changes.sh HEAD~1 HEAD + + - name: Failing Step + run: | + echo "This step will fail" + exit 1 # Force a failure + - name: Syntax error test + run: | + echo "This will cause a syntax error From a80637681c1442c67cb3e69104e25388590fd6df Mon Sep 17 00:00:00 2001 From: frodo-repo <134262496+frodo-repo@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:29:04 +0530 Subject: [PATCH 2/9] Update .github/workflows/github-pipelines.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/workflows/github-pipelines.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-pipelines.yml b/.github/workflows/github-pipelines.yml index 1da93abeb..88cb6630a 100644 --- a/.github/workflows/github-pipelines.yml +++ b/.github/workflows/github-pipelines.yml @@ -37,10 +37,12 @@ jobs: chmod +x ./analyze_changes.sh ./analyze_changes.sh HEAD~1 HEAD - - name: Failing Step + - name: Test Pipeline Failure Handling + if: github.ref == 'refs/heads/test-failures' run: | - echo "This step will fail" - exit 1 # Force a failure + # Simulate a build failure for testing pipeline error handling + echo "Testing pipeline failure scenarios" + exit 1 - name: Syntax error test run: | echo "This will cause a syntax error From 27ed38a3479ffc7423d3fa43b180c44e6947d03b Mon Sep 17 00:00:00 2001 From: frodo-repo <134262496+frodo-repo@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:29:40 +0530 Subject: [PATCH 3/9] Update .github/workflows/github-pipelines.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/workflows/github-pipelines.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-pipelines.yml b/.github/workflows/github-pipelines.yml index 88cb6630a..36511aaf9 100644 --- a/.github/workflows/github-pipelines.yml +++ b/.github/workflows/github-pipelines.yml @@ -43,6 +43,8 @@ jobs: # Simulate a build failure for testing pipeline error handling echo "Testing pipeline failure scenarios" exit 1 - - name: Syntax error test + - name: Test Syntax Error Handling + if: github.ref == 'refs/heads/test-failures' run: | - echo "This will cause a syntax error + # Test how the pipeline handles syntax errors + bash -c 'echo "Testing syntax error handling"; ( syntax error here' From b917e1ee52fee2fa984dac0db813d2b8112d30b0 Mon Sep 17 00:00:00 2001 From: frodo-repo <134262496+frodo-repo@users.noreply.github.com> Date: Fri, 24 Jan 2025 16:58:24 +0530 Subject: [PATCH 4/9] Update github-pipelines.yml --- .github/workflows/github-pipelines.yml | 39 ++++++++------------------ 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/.github/workflows/github-pipelines.yml b/.github/workflows/github-pipelines.yml index 36511aaf9..49f7985f7 100644 --- a/.github/workflows/github-pipelines.yml +++ b/.github/workflows/github-pipelines.yml @@ -1,4 +1,4 @@ -name: CI/CD Pipeline +name: App Test Pipeline on: push: @@ -13,38 +13,23 @@ jobs: - name: Checkout code uses: actions/checkout@v2 with: - fetch-depth: 5 # Fetch 5 commits worth of history + fetch-depth: 5 - - name: Set up Git and Curl + - name: Install dependencies run: | - sudo apt-get update - sudo apt-get install -y git curl - git --version # Verify Git installation - curl --version # Verify curl installation + npm install # Replace with appropriate dependency install command - - name: Cache dependencies (Git & Curl) - uses: actions/cache@v2 - with: - path: | - /usr/bin/git - /usr/bin/curl - key: ${{ runner.os }}-git-curl-${{ hashFiles('**/*.sh') }} - restore-keys: | - ${{ runner.os }}-git-curl- - - - name: Analyze Changes + - name: Run tests run: | - chmod +x ./analyze_changes.sh - ./analyze_changes.sh HEAD~1 HEAD - - - name: Test Pipeline Failure Handling + npm test # Replace with the appropriate test command for your app + + - name: Simulate failure scenario if: github.ref == 'refs/heads/test-failures' run: | - # Simulate a build failure for testing pipeline error handling - echo "Testing pipeline failure scenarios" + echo "Simulating build failure" exit 1 - - name: Test Syntax Error Handling + + - name: Simulate syntax error if: github.ref == 'refs/heads/test-failures' run: | - # Test how the pipeline handles syntax errors - bash -c 'echo "Testing syntax error handling"; ( syntax error here' + bash -c 'echo "Simulating syntax error"; ( syntax error here' From c47e11a7da4b67611755df3ee5f2e7a916c6dc28 Mon Sep 17 00:00:00 2001 From: frodo-repo <134262496+frodo-repo@users.noreply.github.com> Date: Fri, 24 Jan 2025 17:05:19 +0530 Subject: [PATCH 5/9] Update github-pipelines.yml --- .github/workflows/github-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-pipelines.yml b/.github/workflows/github-pipelines.yml index 49f7985f7..65e54290f 100644 --- a/.github/workflows/github-pipelines.yml +++ b/.github/workflows/github-pipelines.yml @@ -24,7 +24,7 @@ jobs: npm test # Replace with the appropriate test command for your app - name: Simulate failure scenario - if: github.ref == 'refs/heads/test-failures' + if: github.ref == 'refs/heads/test-failure' run: | echo "Simulating build failure" exit 1 From 3988518bd398f4c74eff5691032a00f07c679b9b Mon Sep 17 00:00:00 2001 From: frodo-repo <134262496+frodo-repo@users.noreply.github.com> Date: Fri, 24 Jan 2025 17:09:07 +0530 Subject: [PATCH 6/9] Update .github/workflows/github-pipelines.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/workflows/github-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-pipelines.yml b/.github/workflows/github-pipelines.yml index 65e54290f..9043e9db3 100644 --- a/.github/workflows/github-pipelines.yml +++ b/.github/workflows/github-pipelines.yml @@ -24,7 +24,7 @@ jobs: npm test # Replace with the appropriate test command for your app - name: Simulate failure scenario - if: github.ref == 'refs/heads/test-failure' + if: github.ref == 'refs/heads/test-failures' run: | echo "Simulating build failure" exit 1 @@ -32,4 +32,4 @@ jobs: - name: Simulate syntax error if: github.ref == 'refs/heads/test-failures' run: | - bash -c 'echo "Simulating syntax error"; ( syntax error here' + bash -c 'echo "Simulating syntax error"; if [ true ]; then echo "missing fi"' From 63a88d09f97be3d52fae54f1d5cc528e9d9d088a Mon Sep 17 00:00:00 2001 From: frodo-repo <134262496+frodo-repo@users.noreply.github.com> Date: Fri, 24 Jan 2025 17:13:46 +0530 Subject: [PATCH 7/9] removed TODO commment --- .github/workflows/github-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-pipelines.yml b/.github/workflows/github-pipelines.yml index 9043e9db3..af2896955 100644 --- a/.github/workflows/github-pipelines.yml +++ b/.github/workflows/github-pipelines.yml @@ -17,7 +17,7 @@ jobs: - name: Install dependencies run: | - npm install # Replace with appropriate dependency install command + npm install - name: Run tests run: | From a095dcea4f82fa6fba1cd370432bf2e5382afe08 Mon Sep 17 00:00:00 2001 From: frodo-repo <134262496+frodo-repo@users.noreply.github.com> Date: Wed, 5 Feb 2025 13:36:08 +0530 Subject: [PATCH 8/9] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 37c669442..d95fc6565 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,4 @@ | 7 | Build shows up | Build commits show up | Build pipeline triggers | | | 8 | Status: Done | | Build completes | | +ignore From 40e4ce4b9d8c067c86425974391e18677785d083 Mon Sep 17 00:00:00 2001 From: frodo-repo <134262496+frodo-repo@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:24:26 +0530 Subject: [PATCH 9/9] Update .github/workflows/github-pipelines.yml Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com> --- .github/workflows/github-pipelines.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/github-pipelines.yml b/.github/workflows/github-pipelines.yml index af2896955..7a2ced1c4 100644 --- a/.github/workflows/github-pipelines.yml +++ b/.github/workflows/github-pipelines.yml @@ -23,13 +23,4 @@ jobs: run: | npm test # Replace with the appropriate test command for your app - - name: Simulate failure scenario - if: github.ref == 'refs/heads/test-failures' - run: | - echo "Simulating build failure" - exit 1 - - - name: Simulate syntax error - if: github.ref == 'refs/heads/test-failures' - run: | - bash -c 'echo "Simulating syntax error"; if [ true ]; then echo "missing fi"' + # Remove these steps entirely