From 0503d9045d67a1ef095c325af2d538cca6fd7d65 Mon Sep 17 00:00:00 2001 From: Vitali Zaidman Date: Mon, 7 Oct 2024 05:50:27 -0700 Subject: [PATCH] run only integration tests in nightlies (#1367) Summary: Limit the tests we run when installing packages with no `yarn.lock` to integration tests only to not be bothered by minor API changes such as babel typing update that [broke nightlies](https://github.com/facebook/metro/actions/runs/11209024584/job/31153626188) this week. Changelog: [Internal] Reviewed By: huntie Differential Revision: D63977061 --- .github/workflows/nightly-tests.yml | 4 +++- .github/workflows/test.yml | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index 3843bda357..831f6176ac 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -11,6 +11,8 @@ on: schedule: # Daily at at 5:00 UTC - cron: '0 5 * * *' + pull_request: + types: [opened, synchronize] jobs: test: @@ -26,12 +28,12 @@ jobs: '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 }} + only-integration-tests: ${{ matrix.no-lockfile }} comment-on-pr-for-failures: runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7da3ddc69b..bd36fd4a9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,10 +14,14 @@ on: type: string required: false default: 'false' + only-integration-tests: + type: string + required: false + default: 'false' jobs: test: - name: "Tests [Node.js ${{ inputs.node-version }}, ${{ inputs.runs-on }}, ${{ inputs.no-lockfile == 'false' && 'Using yarn.lock' || 'Ignoring yarn.lock' }}]" + name: "${{inputs.only-integration-tests =='true' && 'Integration' || 'All'}} 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 @@ -26,4 +30,4 @@ jobs: 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='./' + run: yarn jest ${{inputs.only-integration-tests == 'true' && '"integration"' || ''}} --ci --maxWorkers 4 --reporters=default --reporters=jest-junit --rootdir='./'