File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-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..."
18+ echo "TEST_RESULT_OVERRIDE: ${{ vars.TEST_RESULT_OVERRIDE }}"
19+
20+ if [ -n "${{ vars.TEST_RESULT_OVERRIDE }}" ]; then
21+ if [ "${{ vars.TEST_RESULT_OVERRIDE }}" == "pass" ]; then
22+ echo "Tests passed by override (via environment)!"
23+ exit 0
24+ elif [ "${{ vars.TEST_RESULT_OVERRIDE }}" == "fail" ]; then
25+ echo "Tests failed by override (via environment)!"
26+ exit 1
27+ fi
28+ else
29+ echo "Random test result mode..."
30+ if [ $((RANDOM % 2)) -eq 0 ]; then
31+ echo "Tests passed!"
32+ exit 0
33+ else
34+ echo "Tests failed!"
35+ exit 1
36+ fi
37+ fi
38+
39+ - name : Mark workflow as successful
40+ if : success()
41+ 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