-
-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (35 loc) · 1.32 KB
/
danger-workflow-tests.yml
File metadata and controls
42 lines (35 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# This isn't a reusable workflow but an actual CI action for this repo itself - to test the workflows.
name: Danger Workflow Tests
on:
pull_request:
types: [opened, synchronize, reopened, edited, ready_for_review]
permissions:
contents: read
pull-requests: write
statuses: write
jobs:
# Test Danger action on pull requests - should analyze PR and report findings
pr-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run danger action
id: danger
uses: ./danger
- name: Validate danger outputs
env:
DANGER_OUTCOME: ${{ steps.danger.outputs.outcome }}
run: |
echo "🔍 Validating Danger action outputs..."
echo "Danger Outcome: '$DANGER_OUTCOME'"
# Validate that Danger ran successfully
if [[ "$DANGER_OUTCOME" != "success" ]]; then
echo "❌ Expected Danger outcome 'success', got '$DANGER_OUTCOME'"
echo "This could indicate:"
echo " - Danger found issues that caused it to fail"
echo " - The action itself encountered an error"
echo " - Docker container issues"
exit 1
fi
echo "✅ Danger PR analysis completed successfully!"
echo "ℹ️ Check the PR comments for any Danger findings"