Skip to content

Commit 3a50809

Browse files
Update failing checks to match specification
- 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
1 parent 7810dde commit 3a50809

File tree

2 files changed

+41
-63
lines changed

2 files changed

+41
-63
lines changed

.github/workflows/lint-check.yml

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,30 @@
1-
name: Linting Check
1+
name: Failing Check 1
22

33
on:
44
push:
5-
branches: [ main, develop ]
5+
branches:
6+
- main
67
pull_request:
7-
branches: [ main, develop ]
8+
branches:
9+
- main
10+
workflow_dispatch:
811

912
jobs:
10-
lint:
13+
failing-job:
1114
runs-on: ubuntu-latest
12-
15+
timeout-minutes: 5
16+
1317
steps:
14-
- uses: actions/checkout@v4
15-
16-
- name: Set up Python
17-
uses: actions/setup-python@v4
18-
with:
19-
python-version: '3.9'
20-
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install flake8 black isort
25-
26-
- name: Run linting checks (DESIGNED TO FAIL)
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Wait for 1 minute then fail
2722
run: |
28-
echo "🔍 Running linting checks..."
29-
echo "❌ CRITICAL: Code style violations detected!"
30-
echo " - Line too long in main.py:42"
31-
echo " - Missing docstring in game/player.py"
32-
echo " - Unused import in utils/save_load.py"
33-
echo " - Inconsistent indentation in locations/forest.py"
34-
echo ""
35-
echo "💥 Linting check failed with 4 violations"
23+
echo "Starting failing check..."
24+
echo "This check will run for 1 minute and then fail"
25+
26+
# Wait for 60 seconds (1 minute)
27+
sleep 60
28+
29+
echo "1 minute has passed, now failing..."
3630
exit 1
37-
Lines changed: 21 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,30 @@
1-
name: Security Scan
1+
name: Failing Check 2
22

33
on:
44
push:
5-
branches: [ main, develop ]
5+
branches:
6+
- main
67
pull_request:
7-
branches: [ main, develop ]
8+
branches:
9+
- main
10+
workflow_dispatch:
811

912
jobs:
10-
security:
13+
failing-job:
1114
runs-on: ubuntu-latest
12-
15+
timeout-minutes: 5
16+
1317
steps:
14-
- uses: actions/checkout@v4
15-
16-
- name: Set up Python
17-
uses: actions/setup-python@v4
18-
with:
19-
python-version: '3.9'
20-
21-
- name: Install security tools
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install bandit safety
25-
26-
- name: Run security scan (DESIGNED TO FAIL)
27-
run: |
28-
echo "🛡️ Running security vulnerability scan..."
29-
echo "🚨 SECURITY ALERT: Critical vulnerabilities found!"
30-
echo ""
31-
echo " HIGH SEVERITY:"
32-
echo " - [B101] Use of assert detected (main.py:156)"
33-
echo " - [B602] Subprocess call with shell=True (utils/save_load.py:23)"
34-
echo ""
35-
echo " MEDIUM SEVERITY:"
36-
echo " - [B108] Hardcoded temporary file (game/world.py:89)"
37-
echo " - [B311] Random generators not suitable for security (game/actions.py:45)"
38-
echo ""
39-
echo " DEPENDENCY VULNERABILITIES:"
40-
echo " - requests==2.25.1 has known security vulnerability CVE-2023-32681"
41-
echo " - urllib3==1.26.5 has known security vulnerability CVE-2023-43804"
42-
echo ""
43-
echo "💥 Security scan failed with 2 HIGH and 4 MEDIUM severity issues"
44-
exit 2
18+
- name: Checkout code
19+
uses: actions/checkout@v4
4520

21+
- name: Wait for 1 minute then fail
22+
run: |
23+
echo "Starting failing check..."
24+
echo "This check will run for 1 minute and then fail"
25+
26+
# Wait for 60 seconds (1 minute)
27+
sleep 60
28+
29+
echo "1 minute has passed, now failing..."
30+
exit 1

0 commit comments

Comments
 (0)