File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Nightly Build
2+ on :
3+ workflow_dispatch :
4+ schedule :
5+ - cron : " 0 0 * * *"
6+
7+ jobs :
8+ full-validation :
9+ runs-on : ubuntu-latest
10+ environment : DEV
11+ steps :
12+ - name : Checkout code
13+ uses : actions/checkout@v4
14+
15+ - name : Run tests (controlled via environment variable)
16+ run : |
17+ echo "Running nightly tests with environment override..."
18+ if [ -n "${{ secrets.TEST_RESULT_OVERRIDE }}" ]; then
19+ if [ "${{ secrets.TEST_RESULT_OVERRIDE }}" == "pass" ]; then
20+ echo "Tests passed by override (via environment)!"
21+ exit 0
22+ elif [ "${{ secrets.TEST_RESULT_OVERRIDE }}" == "fail" ]; then
23+ echo "Tests failed by override (via environment)!"
24+ exit 1
25+ fi
26+ else
27+ echo "Random test result mode..."
28+ if [ $((RANDOM % 2)) -eq 0 ]; then
29+ echo "Tests passed!"
30+ exit 0
31+ else
32+ echo "Tests failed!"
33+ exit 1
34+ fi
35+ fi
36+
37+ - name : Mark workflow as successful
38+ if : success()
39+ run : echo "Tests passed successfully!"
Original file line number Diff line number Diff line change 4949 uses : actions/github-script@v7
5050 with :
5151 script : |
52+
5253 const labels = context.payload.pull_request.labels.map(label => label.name);
5354 const hasQuickValidation = labels.includes('quick validation');
5455 const hasFullValidation = labels.includes('full validation');
You can’t perform that action at this time.
0 commit comments