Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/github-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ 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

- name: Simulate syntax error
if: github.ref == 'refs/heads/test-failures'
if: github.ref == 'refs/heads/test-failure'
run: |
bash -c 'echo "Simulating syntax error"; if [ true ]; then echo "missing fi"'
Comment on lines 34 to 35
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Intentionally malformed bash syntax could cause pipeline debugging issues. Consider using a clearer failure simulation method.

Comment on lines 26 to 35

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Consolidate duplicate workflow steps

Suggested change
- 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
- name: Simulate syntax error
if: github.ref == 'refs/heads/test-failures'
if: github.ref == 'refs/heads/test-failure'
run: |
bash -c 'echo "Simulating syntax error"; if [ true ]; then echo "missing fi"'
- name: Run test failure simulations
if: github.ref == 'refs/heads/test-failure'
run: |
echo "Simulating build failure"
exit 1
echo "Simulating syntax error"
bash -c 'echo "Simulating syntax error"; if [ true ]; then echo "missing fi"'