Skip to content

Commit

Permalink
(GH-402) Add integration tests for Cake.Issues.MsBuild
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Apr 19, 2024
1 parent b304c58 commit e9ecb9b
Show file tree
Hide file tree
Showing 12 changed files with 661 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,35 @@ jobs:
with:
name: NuGet Package
path: ./BuildArtifacts/Packages/NuGet/
# Integration Tests Cake.Issues.MsBuild Cake Scripting
IntegrationTestsMsBuildCakeScripting:
name: Integration Tests Cake.Issues.MsBuild Cake Scripting
needs: Build
strategy:
fail-fast: false
matrix:
os: [
windows-2019, windows-2022,
ubuntu-20.04, ubuntu-22.04,
macos-11, macos-14]
dotnet: [6.x, 7.x, 8.x]
runs-on: ${{ matrix.os }}
steps:
- name: Get the sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Download build artifact
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4
with:
name: NuGet Package
path: ./BuildArtifacts/Packages/NuGet
- name: Install .NET
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Run integration tests
run: ./build.sh --verbosity=diagnostic
working-directory: ./tests/Cake.Issues.MsBuild/script-runner/
shell: bash
# Integration Tests Cake.Issues.PullRequests.GitHubActions Cake Scripting
IntegrationTestsPullRequestsGitHubActionsCakeScripting:
name: Integration Tests Cake.Issues.PullRequests.GitHubActions Cake Scripting
Expand Down
29 changes: 29 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,35 @@ stages:
artifact: Integration Tests Cake.Issues.Markdownlint $(System.JobName)
displayName: 'Publish generated reports as build artifact'

- stage: IntegrationTestsMsBuildStage
displayName: Integration Tests Cake.Issues.MsBuild
dependsOn: BuildStage
jobs:
- job: TestMsBuildJob
displayName: Test
strategy:
matrix:
Windows_Server_2019:
imageName: 'windows-2019'
Windows_Server_2022:
imageName: 'windows-2022'
macOS_11:
imageName: 'macOS-11'
macOS_13:
imageName: 'macOS-13'
Ubuntu_20_04:
imageName: 'ubuntu-20.04'
Ubuntu_22_04:
imageName: 'ubuntu-22.04'
pool:
vmImage: $(imageName)
steps:
- template: .azuredevops/pipelines/templates/steps/install-net6.yml
- template: .azuredevops/pipelines/templates/steps/provide-nuget-packages.yml
- powershell: ./build.ps1 --verbosity=diagnostic
workingDirectory: ./tests/Cake.Issues.MsBuild/script-runner
displayName: 'Run integration tests'

- stage: IntegrationTestsReportingConsoleStage
displayName: Integration Tests Cake.Issues.Reporting.Console
dependsOn: BuildStage
Expand Down
12 changes: 12 additions & 0 deletions tests/Cake.Issues.MsBuild/script-runner/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"cake.tool": {
"version": "4.0.0",
"commands": [
"dotnet-cake"
]
}
}
}
Loading

0 comments on commit e9ecb9b

Please sign in to comment.