-
Notifications
You must be signed in to change notification settings - Fork 629
49 lines (45 loc) · 1.72 KB
/
nightly-tests.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
# In order to be updated when nightlies fail, please subscribe for updates on PR:
# ---> https://github.com/facebook/metro/pull/1314 <---
# where comments will be published on fail.
# This is a bit of a workaround tackling the lack of an organic way
# to notify certain people when a Github workflow fails:
# https://github.com/orgs/community/discussions/18039
name: facebook/metro/nightly-tests
on:
schedule:
# Daily at at 5:00 UTC
- cron: '0 5 * * *'
jobs:
test:
strategy:
max-parallel: 1 # reduces the flakiness of these tests
fail-fast: false
matrix:
runs-on: ['ubuntu-latest', 'windows-latest', 'macos-latest']
node-version: [ # https://github.com/nodejs/release#release-schedule
'18.18.0', # minimum supported
'lts/-1', # pre-latest lts
'lts/*', # latest lts
'current' # newest
]
no-lockfile: ['false', 'true']
uses: ./.github/workflows/test.yml
with:
node-version: ${{ matrix.node-version }}
runs-on: ${{ matrix.runs-on }}
no-lockfile: ${{ matrix.no-lockfile }}
comment-on-pr-for-failures:
runs-on: ubuntu-latest
needs: [test]
if: ${{ always() && needs.test.result == 'failure' }}
steps:
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
// see https://github.com/facebook/metro/pull/1314
issue_number: 1314,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'The nightly workflow `${{ github.workflow }}` failed in [run ${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})!',
});