forked from nodejs/undici
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (68 loc) · 2.11 KB
/
nightly.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Nightly tests
on:
workflow_dispatch:
schedule:
- cron: "0 10 * * *"
permissions:
contents: read
jobs:
test-linux:
if: github.repository == 'nodejs/undici'
uses: ./.github/workflows/test.yml
with:
node-version: 23-nightly
runs-on: ubuntu-latest
secrets: inherit
test-autobahn:
if: github.repository == 'nodejs/undici'
uses: ./.github/workflows/autobahn.yml
with:
node-version: 23-nightly
secrets: inherit
test-windows:
if: github.repository == 'nodejs/undici'
uses: ./.github/workflows/test.yml
with:
node-version: 23-nightly
runs-on: windows-latest
secrets: inherit
test-macos:
if: github.repository == 'nodejs/undici'
uses: ./.github/workflows/test.yml
with:
node-version: 23-nightly
runs-on: macos-latest
secrets: inherit
report-failure:
if: ${{ always() && (needs.test-linux.result == 'failure' && needs.test-windows.result == 'failure' && needs.test-macos.result == 'failure') }}
needs:
- test-linux
- test-windows
- test-macos
- test-autobahn
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Create or update issue
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const ISSUE_TITLE = "Nightly tests are failing"
const actionRunUrl = "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
const issueContext = {
owner: context.repo.owner,
repo: context.repo.repo
}
let issue = (await github.rest.issues.listForRepo({
state: "open",
creator: "github-actions[bot]",
...issueContext
})).data.find((issue) => issue.title === ISSUE_TITLE)
if(!issue) {
issue = (await github.rest.issues.create({
title: ISSUE_TITLE,
body: `Tests against nightly failed, see: ${actionRunUrl}`,
...issueContext
})).data
}