Skip to content

Commit 27d834b

Browse files
committed
Add nightly.yaml
1 parent c0a1d25 commit 27d834b

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/labels.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
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');

.github/workflows/nightly.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Run tests (random success/failure)
15+
run: |
16+
echo "Running nightly tests..."
17+
if [ $((RANDOM % 2)) -eq 0 ]; then
18+
echo "Tests passed!"
19+
exit 0
20+
else
21+
echo "Tests failed!"
22+
exit 0
23+
fi
24+
25+
- name: Mark workflow as successful
26+
if: success()
27+
run: echo "Tests passed successfully!"

0 commit comments

Comments
 (0)