forked from bterlson/openai-in-typespec
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
87 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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 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,23 @@ | ||
using NUnit.Framework; | ||
using System; | ||
|
||
namespace OpenAI.Tests; | ||
|
||
public partial class GitHubTests | ||
{ | ||
[Test(Description = "Test that we can use a GitHub secret")] | ||
[Category("Online")] | ||
public void CanUseGitHubSecret() | ||
{ | ||
string gitHubSecretString = Environment.GetEnvironmentVariable("SECRET_VALUE"); | ||
Assert.That(gitHubSecretString, Is.Not.Null.Or.Empty); | ||
} | ||
|
||
[Test(Description = "That that we can run some tests without secrets")] | ||
[Category("Offline")] | ||
public void CanTestWithoutSecretAccess() | ||
{ | ||
int result = 2 + 1; | ||
Assert.That(result, Is.EqualTo(3)); | ||
} | ||
} |
This file contains 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,17 @@ | ||
The workflows in this repository try to follow existing, basic samples with little customization. | ||
|
||
## main.yml | ||
We use a basic dotnet build/test/pack workflow | ||
https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | ||
|
||
- Build the solution using the dotnet cli | ||
- Strong name the assemblies using a key stored in the repository | ||
https://github.com/dotnet/runtime/blob/main/docs/project/strong-name-signing.md | ||
- Test the built libraries | ||
- Use a repository secret to hold the OpenAI token used for live testing | ||
https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions | ||
- Package the built libraries | ||
- Publish the package as a GitHub Release | ||
- Publish the package to a GitHub NuGet registry | ||
https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry | ||
- Publish a single build artifact containing test results and a nuget package |
This file contains 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 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 |
---|---|---|
|
@@ -15,6 +15,7 @@ launchSettings.json | |
.assets | ||
|
||
# Build results | ||
/artifacts | ||
binaries/ | ||
[Dd]ebug*/ | ||
[Rr]elease/ | ||
|