From 066fdd82b081728e0a443d787848e8bfa0882002 Mon Sep 17 00:00:00 2001 From: Charlie Poole Date: Sat, 12 Oct 2024 08:00:45 -0700 Subject: [PATCH] Add CI Workflow --- .github/workflows/testcentric-gui-ci.yml | 68 +++++++++++++++++++ build.cake | 2 +- .../testcentric.engine.api.csproj | 4 +- testcentric.engine.api.sln | 11 ++- 4 files changed, 81 insertions(+), 4 deletions(-) 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 0000000..30d253f --- /dev/null +++ b/.github/workflows/testcentric-gui-ci.yml @@ -0,0 +1,68 @@ +name: TestCentric.Net462Agent.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: 🔧 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/build.cake b/build.cake index 15bbef7..7758fcc 100644 --- a/build.cake +++ b/build.cake @@ -1,5 +1,5 @@ // Load the recipe -#load nuget:?package=TestCentric.Cake.Recipe&version=1.3.2 +#load nuget:?package=TestCentric.Cake.Recipe&version=1.3.3 // Comment out above line and uncomment below for local tests of recipe changes //#load ../TestCentric.Cake.Recipe/recipe/*.cake diff --git a/src/testcentric.engine.api/testcentric.engine.api.csproj b/src/testcentric.engine.api/testcentric.engine.api.csproj index f93e60d..e3e4534 100644 --- a/src/testcentric.engine.api/testcentric.engine.api.csproj +++ b/src/testcentric.engine.api/testcentric.engine.api.csproj @@ -39,8 +39,8 @@ - - + + \ No newline at end of file diff --git a/testcentric.engine.api.sln b/testcentric.engine.api.sln index 0a349d1..c7542d8 100644 --- a/testcentric.engine.api.sln +++ b/testcentric.engine.api.sln @@ -27,7 +27,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuget", "nuget", "{79FED62B nuget\TestCentric.Engine.Api.nuspec = nuget\TestCentric.Engine.Api.nuspec EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestCentric.Engine.Api.Tests", "src\TestCentric.Engine.Api.Tests\TestCentric.Engine.Api.Tests.csproj", "{3A99C7F4-4918-42BC-8364-0618F454B616}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestCentric.Engine.Api.Tests", "src\TestCentric.Engine.Api.Tests\TestCentric.Engine.Api.Tests.csproj", "{3A99C7F4-4918-42BC-8364-0618F454B616}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{4EF13283-256F-4CFE-97B7-2FFFB23145B0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{660649B9-30E3-4A6B-85C8-68CF25097169}" + ProjectSection(SolutionItems) = preProject + ..\TestCentric.InternalTrace\.github\workflows\testcentric-internal-trace.ci.yml = ..\TestCentric.InternalTrace\.github\workflows\testcentric-internal-trace.ci.yml + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -49,6 +56,8 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {79FED62B-5228-43F8-8DB9-95841F8534B3} = {E5D814AC-758E-4AB0-94F2-465CD467362C} + {4EF13283-256F-4CFE-97B7-2FFFB23145B0} = {E5D814AC-758E-4AB0-94F2-465CD467362C} + {660649B9-30E3-4A6B-85C8-68CF25097169} = {4EF13283-256F-4CFE-97B7-2FFFB23145B0} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4AA81645-C1F0-4C48-A401-63D326070B6E}