-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
chore(test): migrate from Jest to node:test
#7623
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4b84b32
chore(test): migrate from Jest to `node:test`
avivkeller cd005a8
add missing `,`
avivkeller 7296d82
document custom loader
avivkeller ea2b8b1
[tmp, verify storybook]
avivkeller 977a7b6
Revert "[tmp, verify storybook]"
avivkeller 7f429d2
Apply suggestions from code review
avivkeller 57967c1
Apply suggestions from code review
avivkeller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avivkeller marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # Security Notes | ||
| # Only selected Actions are allowed within this repository. Please refer to (https://github.com/nodejs/nodejs.org/settings/actions) | ||
| # for the full list of available actions. If you want to add a new one, please reach out a maintainer with Admin permissions. | ||
| # REVIEWERS, please always double-check security practices before merging a PR that contains Workflow changes!! | ||
| # AUTHORS, please only use actions with explicit SHA references, and avoid using `@master` or `@main` references or `@version` tags. | ||
|
|
||
| name: Chromatic | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request_target: | ||
| branches: | ||
| - main | ||
| types: | ||
| - labeled | ||
| merge_group: | ||
|
|
||
| defaults: | ||
| run: | ||
| # This ensures that the working directory is the root of the repository | ||
| working-directory: ./ | ||
|
|
||
| permissions: | ||
| contents: read | ||
| actions: read | ||
|
|
||
| env: | ||
| # See https://turbo.build/repo/docs/reference/command-line-reference/run#--force | ||
| TURBO_FORCE: true | ||
|
|
||
| jobs: | ||
| chromatic: | ||
| # We only need to run Storybook Builds and Storybook Visual Regression Tests within Pull Requests that actually | ||
| # introduce changes to the Storybook. Hence, we skip running these on Crowdin PRs and Dependabot PRs | ||
| # sha reference has no stable git tag reference or URL. see https://github.com/chromaui/chromatic-cli/issues/797 | ||
| if: | | ||
| github.event_name == 'push' || | ||
| ( | ||
| github.event_name == 'pull_request_target' && | ||
| startsWith(github.event.pull_request.head.ref, 'dependabot/') == false && | ||
| github.event.pull_request.head.ref != 'chore/crowdin' | ||
| ) | ||
|
|
||
| name: Tests | ||
| runs-on: ubuntu-latest | ||
|
|
||
| environment: | ||
| name: Storybook | ||
| url: ${{ steps.chromatic-deploy.outputs.storybookUrl }} | ||
|
|
||
| steps: | ||
| - name: Harden Runner | ||
| uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 | ||
| with: | ||
| egress-policy: audit | ||
|
|
||
| - name: Git Checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| # Provides the Pull Request commit SHA or the GitHub merge group ref | ||
| ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }} | ||
| # The Chromatic (@chromaui/action) Action requires a full history of the current branch in order to be able to compare | ||
| # previous changes and previous commits and determine which Storybooks should be tested against and what should be built | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 | ||
| with: | ||
| # We want to ensure that the Node.js version running here respects our supported versions | ||
| node-version-file: '.nvmrc' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install npm packages | ||
| # We want to avoid npm from running the Audit Step and Funding messages on a CI environment | ||
| # We also use `npm i` instead of `npm ci` so that the node_modules/.cache folder doesn't get deleted | ||
| run: npm i --no-audit --no-fund --userconfig=/dev/null | ||
|
|
||
| - name: Start Visual Regression Tests (Chromatic) | ||
| # This assigns the Environment Deployment for Storybook | ||
| id: chromatic-deploy | ||
| uses: chromaui/action@c93e0bc3a63aa176e14a75b61a31847cbfdd341c | ||
| with: | ||
| workingDir: packages/ui-components | ||
| buildScriptName: storybook:build | ||
| projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
| exitOnceUploaded: true | ||
| onlyChanged: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.