diff --git a/.github/actions/yarn-install/action.yml b/.github/actions/yarn-install/action.yml index 059f7650f2..e8381db4bc 100644 --- a/.github/actions/yarn-install/action.yml +++ b/.github/actions/yarn-install/action.yml @@ -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' || false}} + cache-dependency-path: ${{ inputs.no-lockfile == 'false' && 'yarn.lock' || false}} - 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 diff --git a/.github/workflows/nightly-node-compatibility-validation.yml b/.github/workflows/nightly-nodejs-validation.yml similarity index 72% rename from .github/workflows/nightly-node-compatibility-validation.yml rename to .github/workflows/nightly-nodejs-validation.yml index c3a1dd90ed..d356ddf3ea 100644 --- a/.github/workflows/nightly-node-compatibility-validation.yml +++ b/.github/workflows/nightly-nodejs-validation.yml @@ -6,11 +6,12 @@ # 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-nodejs-validation 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 * * *' + push: jobs: test: @@ -25,10 +26,13 @@ jobs: '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 @@ -43,5 +47,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 }})!', }); diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 556d64ed14..14242b434d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }}, ${{ matrix.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='./'