Skip to content

Commit ba30431

Browse files
CopilotJReinhold
andauthored
Add copilot-setup-steps.yml workflow for Copilot Coding Agent environment preparation (#90)
* Initial plan * Add copilot-setup-steps.yml for GitHub Copilot environment setup Co-authored-by: JReinhold <5678122+JReinhold@users.noreply.github.com> * Use custom setup-node-and-install action in copilot-setup-steps.yml Co-authored-by: JReinhold <5678122+JReinhold@users.noreply.github.com> * Fix copilot-setup-steps.yml location and format as GitHub Actions workflow Co-authored-by: JReinhold <5678122+JReinhold@users.noreply.github.com> * Fix formatting and add critical formatting instructions to copilot-instructions.md Co-authored-by: JReinhold <5678122+JReinhold@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JReinhold <5678122+JReinhold@users.noreply.github.com>
1 parent d8ce62a commit ba30431

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/copilot-instructions.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,19 @@ The `@storybook/mcp` package (in `packages/mcp`) is framework-agnostic:
122122
- `mcp-endpoint.e2e.test.ts` - MCP protocol and tool tests
123123
- `check-deps.e2e.test.ts` - Storybook version validation
124124

125+
**Formatting and checks (CRITICAL):**
126+
127+
- **ALWAYS format code after making changes**: Run `pnpm run format` before committing
128+
- **ALWAYS run checks after formatting**: Run `pnpm run check` to ensure all checks pass
129+
- **Fix any failing checks**: Analyze check results and fix issues until all checks pass
130+
- **This is mandatory for every commit** - formatting checks will fail in CI if not done
131+
- The workflow is:
132+
1. Make your code changes
133+
2. Run `pnpm run format` to format all files
134+
3. Run `pnpm run check` to verify all checks pass
135+
4. Fix any failing checks and repeat step 3 until all pass
136+
5. Commit your changes
137+
125138
**Type checking:**
126139

127140
- All packages have TypeScript strict mode enabled
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: 'Copilot Setup Steps'
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
14+
env:
15+
TURBO_ENV_MODE: loose
16+
17+
jobs:
18+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
19+
copilot-setup-steps:
20+
runs-on: ubuntu-latest
21+
22+
# Set the permissions to the lowest permissions possible needed for your steps.
23+
# Copilot will be given its own token for its operations.
24+
permissions:
25+
contents: read
26+
27+
# You can define any steps you want, and they will run before the agent starts.
28+
# If you do not check out your code, Copilot will do this for you.
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
32+
33+
- name: Setup Node.js and Install Dependencies
34+
uses: ./.github/actions/setup-node-and-install
35+
36+
- name: Build packages
37+
run: pnpm turbo run build

0 commit comments

Comments
 (0)