From 2dfb0e6bde10d41ba4496d3e5fc7549d14778ff5 Mon Sep 17 00:00:00 2001 From: Charlie Poole Date: Thu, 10 Oct 2024 07:18:06 -0700 Subject: [PATCH] Add GitHub workflow action for continuous integration --- .github/workflows/testcentric-gui-ci.yml | 79 ++++++++++++++++++++++++ testcentric-gui.sln | 9 +++ 2 files changed, 88 insertions(+) create mode 100644 .github/workflows/testcentric-gui-ci.yml diff --git a/.github/workflows/testcentric-gui-ci.yml b/.github/workflows/testcentric-gui-ci.yml new file mode 100644 index 000000000..b16127e39 --- /dev/null +++ b/.github/workflows/testcentric-gui-ci.yml @@ -0,0 +1,79 @@ +name: TestCentric.GuiRunner.CI + +on: + workflow_dispatch: + pull_request: + push: + paths-ignore: + - "*.txt" + - "*.md" + +env: + DOTNET_NOLOGO: true # Disable the .NET logo + DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry + +jobs: + ContinuousIntegration: + name: Continuous Integration + runs-on: windows-latest + + env: + TESTCENTRIC_MYGET_API_KEY: ${{ secrets.TESTCENTRIC_MYGET_API_KEY }} + TESTCENTRIC_NUGET_API_KEY: ${{ secrets.TESTCENTRIC_NUGET_API_KEY }} + TESTCENTRIC_CHOCO_API_KEY: ${{ secrets.TESTCENTRIC_CHOCO_API_KEY }} + GITHUB_ACCESS_TOKEN: ${{ secrets.TESTCENTRIC_GITHUB_ACCESS_TOKEN }} + + steps: + - name: ⤵️ Checkout Source + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: 🛠️ Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 2.1.x + 3.1.x + 5.0.x + 6.0.x + 7.0.x + 8.0.x + + - name: 🔧 Install dotnet tools + run: dotnet tool restore + + - name: 🍰 Run cake + env: + TESTCENTRIC_MYGET_API_KEY: ${{ secrets.TESTCENTRIC_MYGET_API_KEY }} + TESTCENTRIC_NUGET_API_KEY: ${{ secrets.TESTCENTRIC_NUGET_API_KEY }} + TESTCENTRIC_CHOCO_API_KEY: ${{ secrets.TESTCENTRIC_CHOCO_API_KEY }} + GITHUB_ACCESS_TOKEN: ${{ secrets.TESTCENTRIC_GITHUB_ACCESS_TOKEN }} + + # If you need to get more verbose logging, add the following to the dotnet-cake above: --verbosity=diagnostic + run: dotnet cake --target=ContinuousIntegration --configuration=Release + + - name: 🪵 Upload build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: Upload Console Logs + # This path is defined in build-settings.cake + path: "build-results/*.binlog" + # if-no-files-found: error + + - name: 🪵 Upload InternalTrace logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: InternalTraceLogs + # This path is defined in build-settings.cake + path: "*.log" + # if-no-files-found: error + + - name: 💾 Upload test results + uses: actions/upload-artifact@v4 + if: always() + with: + name: "Test Results" + path: test-results diff --git a/testcentric-gui.sln b/testcentric-gui.sln index 032ed999d..380aee0e9 100644 --- a/testcentric-gui.sln +++ b/testcentric-gui.sln @@ -78,6 +78,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "aspnetcore-test", "src\test EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "windows-forms-test", "src\tests\windows-forms-test\windows-forms-test.csproj", "{51B2B3DC-7EC7-46B4-B51F-53C164F44A4B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{A841D26B-422E-40EF-AE78-019B6BEB5B73}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{8F99EF67-A6E4-4F47-85B6-3B3E683B6A14}" + ProjectSection(SolutionItems) = preProject + .github\workflows\testcentric-gui-ci.yml = .github\workflows\testcentric-gui-ci.yml + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -156,6 +163,8 @@ Global {A0A0C740-487E-420C-9515-29E0016D05E6} = {0F939442-8450-41CF-8BB7-FAA00866F4E4} {D5D58A65-C6FC-4B93-B6D3-86201D8F8219} = {0F939442-8450-41CF-8BB7-FAA00866F4E4} {51B2B3DC-7EC7-46B4-B51F-53C164F44A4B} = {0F939442-8450-41CF-8BB7-FAA00866F4E4} + {A841D26B-422E-40EF-AE78-019B6BEB5B73} = {A65042E1-D8BC-48DD-8DE1-F0991F07EA77} + {8F99EF67-A6E4-4F47-85B6-3B3E683B6A14} = {A841D26B-422E-40EF-AE78-019B6BEB5B73} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CDFF439B-8888-4133-8734-86F4F899BC40}