OkGoDoIt / OpenAI-API-dotnet

An unofficial C#/.NET SDK for accessing the OpenAI GPT-3 API
https://www.nuget.org/packages/OpenAI/
Other
1.84k stars 428 forks source link

Setup GH Actions CI/CD #72

Open Baklap4 opened 1 year ago

Baklap4 commented 1 year ago

Each program/library in 2023 should have some form of automation to ensure stuff builds and can be deployed without manually opening up VS(code) and build the project.

GH offers a feature called Github Actions which does exactly that. Automate the stuff like builds and create releases.

This ensures quality, and can execute your tests automaticly.

Todo

sannae commented 1 year ago

Hi! First-time contributor, please be understanding... 😅 I'd like to help on this issue, if no one is already working on it - I have a little experience with GitHub Actions CI/CD, and I'd like to improve specifically in the context of .NET applications. Which tool would you suggest for performing static analysis? Something like the CodeQL action?

Baklap4 commented 1 year ago

Basicly for dotnet there are a couple of steps:

For static analysis i'd first rely on the static analysis from dotnet itself which is already pretty good and with NRT enabled even better. This can be done by setting up some csproj properties combined with TreatWarningsAsErrors. Aside from that there's the code conventions mentioned in #71 this is done through an EditorConfig file in which we can specify what we treat as Suggestion, info, warning, error. But someone should first finalize that + apply it to the codebase i think.

sannae commented 1 year ago

Thanks for the tips! I'd try to set up a CI/CD workflow without static analysis, then maybe integrate it along the way. What do you think?