-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
CI: Provide basic CI jobs for forked repositories, and disable our own jobs #32632
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
Changes from 14 commits
13e5f66
24be579
2f147c7
12ec9ab
006d427
fc37ed9
0d172c0
bbc93d2
5a55a1f
aaf43f5
56b4955
c367d7e
eece31d
79cac23
f0427d4
380f9ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: Fork checks | ||
|
|
||
| # This workflow is only for forks, so they can get basic checks in without a CircleCI API key | ||
| on: | ||
| push: | ||
|
|
||
| env: | ||
| NODE_OPTIONS: '--max_old_space_size=4096' | ||
|
|
||
| jobs: | ||
| check: | ||
| name: Core Type Checking | ||
| if: github.repository_owner != 'storybookjs' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 2 | ||
|
|
||
| - name: Setup Node.js and Install Dependencies | ||
| uses: ./.github/actions/setup-node-and-install | ||
| with: | ||
| install-code-deps: true | ||
|
|
||
| - name: check | ||
| run: yarn task --task check | ||
|
|
||
| prettier: | ||
| name: Core Formatting | ||
| if: github.repository_owner != 'storybookjs' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 2 | ||
|
|
||
| - name: Setup Node.js and Install Dependencies | ||
| uses: ./.github/actions/setup-node-and-install | ||
| with: | ||
| install-code-deps: true | ||
|
|
||
| - name: prettier | ||
| run: cd code && yarn lint:prettier --check . | ||
|
|
||
| test: | ||
| strategy: | ||
| matrix: | ||
| os: [windows-latest, ubuntu-latest] | ||
| runs-on: ${{ matrix.os }} | ||
| name: Core Unit Tests, ${{ matrix.os }} | ||
| if: github.repository_owner != 'storybookjs' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 2 | ||
|
|
||
| - name: Setup Node.js and Install Dependencies | ||
| uses: ./.github/actions/setup-node-and-install | ||
| with: | ||
| install-code-deps: true | ||
|
|
||
| - name: compile | ||
| run: yarn task --task compile --start-from=compile | ||
|
|
||
| - name: Install Playwright Dependencies | ||
| run: cd code && yarn exec playwright install chromium --with-deps | ||
|
|
||
| - name: test | ||
| run: yarn test | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ permissions: | |
| jobs: | ||
| triage: | ||
| name: Nissuer | ||
| if: github.repository_owner == 'storybookjs' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: balazsorban44/[email protected] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,6 @@ import { global } from '@storybook/global'; | |
|
|
||
| import { addons } from 'storybook/manager-api'; | ||
|
|
||
| /* eslint-disable prettier/prettier */ | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is questionable. To make sure prettier doesn't mess with our sensitive files in forked repos, we need to actually add them to prettierignore. But this is a less good setup for us where we know internally that specific bits of the files should be ignored, but still want automatic formatting on the rest of the files through ESLint.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is prettierignore better for forks here? Is it because forks run prettier directly instead of via eslint? If so, can we just add a prettierignore comment as well as the existing eslint comment?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exactly. See how our command uses
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (btw I meant that my code change was questionable, not the original code ;-) so thanks for questioning it!)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| // THE ORDER OF THESE IMPORTS MATTERS! IT DEFINES THE ORDER OF PANELS AND TOOLS! | ||
| import controlsManager from '../../controls/manager'; | ||
| import actionsManager from '../../actions/manager'; | ||
|
|
@@ -12,7 +11,6 @@ import backgroundsManager from '../../backgrounds/manager'; | |
| import measureManager from '../../measure/manager'; | ||
| import outlineManager from '../../outline/manager'; | ||
| import viewportManager from '../../viewport/manager'; | ||
| /* eslint-enable prettier/prettier */ | ||
|
|
||
| const TAG_FILTERS = 'tag-filters'; | ||
| const STATIC_FILTER = 'static-filter'; | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
pull_requesttrigger to enable checks on fork PRs.The workflow currently only triggers on
pushevents, which means code reviews and PR checks won't automatically run for contributors. Add thepull_requesttrigger so checks execute when PRs are opened or updated.on: push: + pull_request:📝 Committable suggestion
🤖 Prompt for AI Agents