Skip to content

add nightly-latest-packages-validation #4

add nightly-latest-packages-validation

add nightly-latest-packages-validation #4

# 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-nodejs-validation
on:
schedule:
# Daily at at 5:00 UTC
- cron: '0 5 * * *'
push:
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
]
no-yarn-lock: ['false', 'true']
name: "Tests [Node.js ${{ matrix.node-version }}, ${{ matrix.runs-on }}, ${{ matrix.no-yarn-lock && 'Ignoring yarn.lock' || 'Using yarn.lock'}}]"
uses: ./.github/workflows/test.yml
with:
node-version: ${{ matrix.node-version }}
runs-on: ${{ matrix.runs-on }}
no-yarn-lock: ${{ matrix.no-yarn-lock }}
# @typescript-eslint/eslint-plugin requires node ^18.18
# but we allow yarn install to run regardless to test the package
ignore-engines: ${{ matrix.node-version == '18.0' && 'true' || 'false'}}
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 }})!',
});