From 46f486f2f1d0aa9a7dcfb8b4d143696cd34e1e49 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sat, 13 Jan 2024 01:23:55 +0100 Subject: [PATCH] Add test CI --- .github/workflows/build-test.yml | 31 +++++++++++++++++++++++++++++++ SS14.Changelog.sln | 7 +++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/build-test.yml diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..360dc88 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,31 @@ +name: Build & Test Debug + +on: + push: + branches: [ master ] + merge_group: + pull_request: + types: [ opened, reopened, synchronize, ready_for_review ] + branches: [ master ] + +jobs: + build: + if: github.actor != 'PJBot' && github.event.pull_request.draft == false + strategy: + matrix: + os: [ubuntu-latest] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout Master + uses: actions/checkout@v3.6.0 + + - name: Install dependencies + run: dotnet restore + + - name: Build Project + run: dotnet build --configuration Debug --no-restore /p:WarningsAsErrors=nullable /m + + - name: Run Tests + run: dotnet test --no-build --configuration Debug diff --git a/SS14.Changelog.sln b/SS14.Changelog.sln index d523ccb..18dd649 100644 --- a/SS14.Changelog.sln +++ b/SS14.Changelog.sln @@ -4,6 +4,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SS14.Changelog", "SS14.Chan EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SS14.Changelog.Tests", "SS14.Changelog.Tests\SS14.Changelog.Tests.csproj", "{34759371-DAC7-41FC-A677-A457E7DF16DB}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub", "GitHub", "{BFDEADF8-0737-41A5-99B9-E53D1FBF9093}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{A7D14556-4367-4729-8214-DF5931EF2ADC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -19,4 +23,7 @@ Global {34759371-DAC7-41FC-A677-A457E7DF16DB}.Release|Any CPU.ActiveCfg = Release|Any CPU {34759371-DAC7-41FC-A677-A457E7DF16DB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {A7D14556-4367-4729-8214-DF5931EF2ADC} = {BFDEADF8-0737-41A5-99B9-E53D1FBF9093} + EndGlobalSection EndGlobal