Skip to content

facebook/metro/nightly-node-compatibility-validation #49

facebook/metro/nightly-node-compatibility-validation

facebook/metro/nightly-node-compatibility-validation #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-node-compatibility-validation
on:
schedule:
# Everyday at at 5:00 UTC (22:00 USA West Coast, 06:00 London)
- cron: '0 5 * * *'
jobs:
test:
strategy:
max-parallel: 1 # reduces the flakiness of these tests
fail-fast: false
matrix:
runs-on: ['ubuntu-latest']
node-version: [ # https://github.com/nodejs/release#release-schedule
'18.0', # minimum supported
'lts/-1', # pre-latest lts
'lts/*', # latest lts
'current' # newest
]
include:
- runs-on: ubuntu-latest
node-version: '18.0'
# @typescript-eslint/eslint-plugin requires node ^18.18
# but we allow yarn install to run regardless to test the package
ignore-engines: 'true'
uses: ./.github/workflows/test.yml
with:
node-version: ${{ matrix.node-version }}
runs-on: ${{ matrix.runs-on }}
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: 'A nightly test failed in `${{ github.workflow }}` in [run ${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})!',
});