Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expand nightlies to test after deleting yarn.lock #1317

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/actions/yarn-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ inputs:
type: string
required: false
default: '20.x'
no-lockfile:
type: string
required: false
default: 'false'

runs:
using: "composite"
steps:
- uses: actions/setup-node@v4
name: Setup Node With Yarn Cache
with:
node-version: ${{ inputs.node-version }}
cache: yarn
cache-dependency-path: yarn.lock
check-latest: true
cache: ${{ inputs.no-lockfile == 'false' && 'yarn' || '' }}
cache-dependency-path: ${{ inputs.no-lockfile == 'false' && 'yarn.lock' || '' }}
- name: Install Dependencies
run: yarn install --frozen-lockfile --non-interactive --ignore-scripts
run: yarn install ${{ inputs.no-lockfile == 'false' && '--frozen-lockfile' || '--no-lockfile' }} --non-interactive --ignore-scripts
shell: bash
6 changes: 5 additions & 1 deletion .github/workflows/build-test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ jobs:
fail-fast: false
matrix:
runs-on: ['ubuntu-latest']
node-version: ['18.18', '18.x', '20.x']
node-version: [
'18.18.0', # minimum supported
'lts/-1', # pre-latest lts
'lts/*', # latest lts
]
uses: ./.github/workflows/test.yml
with:
node-version: ${{ matrix.node-version }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
# to notify certain people when a Github workflow fails:
# https://github.com/orgs/community/discussions/18039

name: facebook/metro/nightly-node-compatibility-validation
name: facebook/metro/nightly-tests
on:
schedule:
# Everyday at at 5:00 UTC (22:00 USA West Coast, 06:00 London)
# Daily at at 5:00 UTC
- cron: '0 5 * * *'

jobs:
Expand All @@ -20,15 +20,18 @@ jobs:
matrix:
runs-on: ['ubuntu-latest']
node-version: [ # https://github.com/nodejs/release#release-schedule
'18.18', # minimum supported
'18.18.0', # minimum supported
'lts/-1', # pre-latest lts
'lts/*', # latest lts
'current' # newest
]
no-lockfile: ['false', 'true']
name: "Tests [Node.js ${{ matrix.node-version }}, ${{ matrix.runs-on }}, ${{ matrix.no-lockfile == 'false' && 'Using yarn.lock' || 'Ignoring yarn.lock' }}]"
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
Expand All @@ -43,5 +46,5 @@ jobs:
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 }})!',
body: 'The nightly workflow `${{ github.workflow }}` failed in [run ${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})!',
});
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,25 @@ on:
node-version:
type: string
required: false
default: 'ubuntu-latest'
default: '20.x'
runs-on:
type: string
required: false
default: '20.x'
default: 'ubuntu-latest'
no-lockfile:
type: string
required: false
default: 'false'

jobs:
test:
name: "Tests [Node.js ${{ inputs.node-version }}, ${{ inputs.runs-on }}]"
name: "Tests [Node.js ${{ inputs.node-version }}, ${{ inputs.runs-on }}, ${{ inputs.no-lockfile == 'false' && 'Using yarn.lock' || 'Ignoring yarn.lock' }}]"
runs-on: ${{ inputs.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/yarn-install
with:
node-version: ${{ inputs.node-version }}
no-lockfile: ${{ inputs.no-lockfile }}
- name: Run Jest Tests
run: yarn jest --ci --maxWorkers 4 --reporters=default --reporters=jest-junit --rootdir='./'
Loading