Skip to content

Commit

Permalink
Add GitHub workflow action for continuous integration
Browse files Browse the repository at this point in the history
  • Loading branch information
CharliePoole committed Oct 10, 2024
1 parent 3fc604a commit 2dfb0e6
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/testcentric-gui-ci.yml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions testcentric-gui.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 2dfb0e6

Please sign in to comment.