From 3ffed904fba4ed7de078b1658dae8cb83e57c73e Mon Sep 17 00:00:00 2001 From: Vitali Zaidman Date: Mon, 7 Oct 2024 05:11:23 -0700 Subject: [PATCH] run only integration tests in nightlies (#1367) Summary: Pull Request resolved: https://github.com/facebook/metro/pull/1367 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..1fbd0d3fe9 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -11,6 +11,7 @@ on: schedule: # Daily at at 5:00 UTC - cron: '0 5 * * *' + push: jobs: test: @@ -26,12 +27,13 @@ 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' }}]" + name: "${{matrix.no-lockfile && 'Integration ' || ''}}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..997ae976ce 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 && 'Integration ' || ''}}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 && '"integration"' || ''}} --ci --maxWorkers 4 --reporters=default --reporters=jest-junit --rootdir='./'