Skip to content

Commit 1e8ee55

Browse files
authored
copilot setup steps (#9409)
1 parent f7cdb05 commit 1e8ee55

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

.github/copilot-instructions.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Instructions for GitHub and VisualStudio Copilot
22
### https://github.blog/changelog/2025-01-21-custom-repository-instructions-are-now-available-for-copilot-on-github-com-public-preview/
33

4-
54
## General
65

76
* Make only high confidence suggestions when reviewing code changes.
87
* Always use the latest version C#, currently C# 13 features.
9-
* Files must have CRLF line endings.
8+
* Never change global.json unless explicitly asked to.
109

1110
## Formatting
1211

@@ -23,11 +22,15 @@
2322
* Always use `is null` or `is not null` instead of `== null` or `!= null`.
2423
* Trust the C# null annotations and don't add null checks when the type system says a value cannot be null.
2524

26-
2725
### Testing
2826

2927
* We use xUnit SDK v3 with Microsoft.Testing.Platform (https://learn.microsoft.com/dotnet/core/testing/microsoft-testing-platform-intro)
3028
* Do not emit "Act", "Arrange" or "Assert" comments.
31-
* We do not use any mocking framework at the moment. Use NSubstitute, if necessary. Never use Moq.
32-
* Use "snake_case" for test method names but keep the original method under test intact.
33-
For example: when adding a test for methond "MethondToTest" instead of "MethondToTest_ShouldReturnSummarisedIssues" use "MethondToTest_should_return_summarised_issues".
29+
* We do not use any mocking framework at the moment.
30+
* Copy existing style in nearby files for test method names and capitalization.
31+
32+
## Running tests
33+
34+
(1) Build from the root with `build.sh`.
35+
(2) If that produces errors, fix those errors and build again. Repeat until the build is successful.
36+
(3) To then run tests, use a command similar to this `dotnet test tests/Aspire.Seq.Tests/Aspire.Seq.Tests.csproj` (using the path to whatever projects are applicable to the change).
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Copilot Setup Steps"
2+
3+
# Allow testing of the setup steps from your repository's "Actions" tab.
4+
on: workflow_dispatch
5+
6+
jobs:
7+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
8+
copilot-setup-steps:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
contents: read
13+
14+
# You can define any steps you want, and they will run before the agent starts.
15+
# If you do not check out your code, Copilot will do this for you.
16+
steps:
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
19+
# Include PrepareForHelix to maximise what is downloaded here
20+
- name: Build solution
21+
run: ./build.sh /p:PrepareForHelix=true

0 commit comments

Comments
 (0)