Skip to content

Commit

Permalink
run only integration tests in nightlies (#1367)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vzaidman authored and facebook-github-bot committed Oct 7, 2024
1 parent 3b3e0aa commit 8a15118
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,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
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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='./'

0 comments on commit 8a15118

Please sign in to comment.