-
Notifications
You must be signed in to change notification settings - Fork 637
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a nightly node compatibility validation testing the app on a set …
…of node versions
- Loading branch information
Showing
4 changed files
with
74 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Install Dependencies | ||
inputs: | ||
node-version: | ||
type: string | ||
required: false | ||
default: '20.x' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
.github/workflows/nightly-node-compatibility-validation.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# in order to subscribe to nighlies fails subscribe for updates on PR: | ||
# ---> https://github.com/facebook/metro/pull/1314 <--- | ||
# | ||
# this is a bit of a workaround tackling the lack of an organic way | ||
# to notify certain people when this 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: | ||
matrix: | ||
runs-on: ['ubuntu-latest'] | ||
# https://github.com/nodejs/release#release-schedule | ||
node-version: [ | ||
'18.0', # minimum supported | ||
'lts/-1', # pre-latest lts | ||
'lts/*', # latest lts | ||
'current' # newest | ||
] | ||
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 }}`!\nPlease address it by adjusting the supported NodeJS versions.', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: test | ||
on: | ||
workflow_call: | ||
inputs: | ||
node-version: | ||
type: string | ||
required: false | ||
default: 'ubuntu-latest' | ||
runs-on: | ||
type: string | ||
required: false | ||
default: '20.x' | ||
|
||
jobs: | ||
test: | ||
name: "Tests [Node.js ${{ inputs.node-version }}, ${{ inputs.runs-on }}]" | ||
runs-on: ${{ inputs.runs-on }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/yarn-install | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
- name: Run Jest Tests | ||
run: yarn jest --ci --maxWorkers 4 --reporters=default --reporters=jest-junit --rootdir='./' |