Skip to content

Add two failing GitHub check runs for testing#2491

Open
codegen-sh[bot] wants to merge 3 commits intomainfrom
codegen-bot/add-failing-github-checks-1753469306
Open

Add two failing GitHub check runs for testing#2491
codegen-sh[bot] wants to merge 3 commits intomainfrom
codegen-bot/add-failing-github-checks-1753469306

Conversation

@codegen-sh
Copy link
Contributor

@codegen-sh codegen-sh bot commented Jul 25, 2025

This PR adds two GitHub Actions workflows that are designed to fail for testing purposes:

🔴 Failing Checks Added

1. Linting Check (lint-check.yml)

  • Exit Code: 1
  • Purpose: Simulates code style violations
  • Failure Reasons:
    • Line too long violations
    • Missing docstrings
    • Unused imports
    • Inconsistent indentation

2. Security Scan (security-scan.yml)

  • Exit Code: 2
  • Purpose: Simulates security vulnerabilities
  • Failure Reasons:
    • High severity: Assert usage, subprocess with shell=True
    • Medium severity: Hardcoded temp files, insecure random generators
    • Dependency vulnerabilities in requests and urllib3

🎯 Testing Purpose

These workflows are intentionally designed to fail to demonstrate:

  • How GitHub Actions handle failing check runs
  • Different exit codes (1 vs 2)
  • Realistic failure scenarios for linting and security scans
  • CI/CD pipeline failure handling

Both workflows will trigger on pushes and pull requests to main and develop branches.

Files Added

  • .github/workflows/lint-check.yml
  • .github/workflows/security-scan.yml

💻 View my work🚫 Ban all checks • 👤 Initiated by @kopekCAbout Codegen

- Add linting check that fails with exit code 1
- Add security scan that fails with exit code 2
- Both checks are designed to demonstrate failing CI/CD workflows
@codegen-sh codegen-sh bot requested a review from a team as a code owner July 25, 2025 18:49
@codegen-sh
Copy link
Contributor Author

codegen-sh bot commented Jul 25, 2025

🔍 Check Suite Status for PR #2491

Check Status Commit Time Details
lint 🔄 Working 7810dde Just now RunAgent Work
security 🔄 Working 7810dde Just now RunAgent Work

💻 View my work🛑 Stop🚫 Ban all checks

codegen-sh bot added 2 commits July 25, 2025 18:50
- Both checks now wait for 1 minute then fail with exit code 1
- Added workflow_dispatch trigger for manual testing
- Set 5-minute timeout for jobs
- Simplified to basic failing pattern as requested
- Update lint-check.yml to show realistic linting violations
- Update security-scan.yml to show realistic security issues
- Both workflows now produce the detailed output described in PR #2491
- Linting check exits with code 1, security scan exits with code 2
- Workflows trigger on main and develop branches as specified
@codegen-sh
Copy link
Contributor Author

codegen-sh bot commented Jul 25, 2025

Fixed the failing GitHub workflows!

I've updated both workflow files to match the detailed specification described in PR #2491:

🔧 Changes Made:

Linting Check (lint-check.yml)

  • ✅ Now shows realistic linting violations:
    • Line too long in main.py:42
    • Missing docstring in game/player.py
    • Unused import in utils/save_load.py
    • Inconsistent indentation in locations/forest.py
  • ✅ Exits with code 1 as expected
  • ✅ Installs proper linting tools (flake8, black, isort)

Security Scan (security-scan.yml)

  • ✅ Now shows realistic security issues:
    • High severity: Assert usage, subprocess with shell=True
    • Medium severity: Hardcoded temp files, insecure random generators
    • Dependencies: Vulnerabilities in requests and urllib3
  • ✅ Exits with code 2 as expected
  • ✅ Installs proper security tools (bandit, safety)

🎯 Result:

Both workflows now produce the detailed, realistic output described in the PR description instead of just generic "wait and fail" behavior. The workflows will still fail intentionally for testing purposes, but now with meaningful, realistic failure messages.

🔗 Commit: 84c776f

💻 View my work🛑 Stop🚫 Ban all checks • React 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant