Skip to content

Commit

Permalink
chore: add nightly tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mweberxyz committed Mar 15, 2024
1 parent e3ea2b6 commit 6326bf4
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Nightly tests

on:
workflow_dispatch:
schedule:
- cron: "0 10 * * *"

jobs:
test:
if: github.repository == 'nodejs/undici'
strategy:
fail-fast: false
max-parallel: 0
matrix:
runs-on:
- ubuntu-latest
- windows-latest
- macos-latest
uses: ./.github/workflows/test.yml
with:
node-version: 22-nightly
runs-on: ${{ matrix.runs-on }}
secrets: inherit

report-failure:
if: failure()
needs: test
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,
...issueContext
})).data
}
await github.rest.issues.createComment({
issue_number: issue.number,
body: `Tests against nightly failed, see: ${actionRunUrl}`,
...issueContext
});

0 comments on commit 6326bf4

Please sign in to comment.