Skip to content

Commit

Permalink
(GH-391) Run integration tests for Cake.Issues.PullRequests.GitHubAct…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
pascalberger committed Apr 13, 2024
1 parent 96850c7 commit b1f7af7
Show file tree
Hide file tree
Showing 13 changed files with 71 additions and 15 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build and tests

# Workflow Trigger
on:
# Trigger the workflow on a pull request to any branch
pull_request:
# Triggers the workflow in the event there is a push to master
push:
branches:
- master

jobs:
# Build
Build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Get the sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Fetch all tags and branches
run: git fetch --prune --unshallow
- name: Install .NET
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4
with:
# .NET 5 required for GitVersion
dotnet-version: |
5.x
6.x
7.x
8.x
- name: Build
run: ./build.sh
shell: bash
- name: Publish NuGet package as build artifact
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: NuGet Package
path: ./BuildArtifacts/Packages/NuGet/
# Integration Tests Cake.Issues.PullRequests.GitHubActions Cake Scripting
IntegrationTestsPullRequestsGitHubActionsCakeScripting:
name: Integration Tests Cake.Issues.PullRequests.GitHubActions Cake Scripting
needs: Build
strategy:
fail-fast: false
matrix:
os: [
windows-2019, windows-2022,
# Disabled until https://github.com/cake-contrib/Cake.Issues/issues/514 is fixed
# 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@eaceaf801fd36c7dee90939fad912460b18a1ffe # 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.PullRequests.GitHubActions/script-runner/
shell: bash
3 changes: 2 additions & 1 deletion CiStatus.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Build & Test Status

## Build / Unit Tests
## Build / Tests

| CI Server | Runner | Operating System | Develop | Master |
|:--:|:--:|:--:|:--:|:--:|
|AppVeyor|N/A|Windows|[![Build status](https://ci.appveyor.com/api/projects/status/sde2oe3lu4kpmw0r/branch/develop?svg=true)](https://ci.appveyor.com/project/cakecontrib/cake-issues/branch/develop)|[![Build status](https://ci.appveyor.com/api/projects/status/sde2oe3lu4kpmw0r/branch/master?svg=true)](https://ci.appveyor.com/project/cakecontrib/cake-issues/branch/master)|
|Azure Pipelines|N/A|Windows|[![Build Status](https://dev.azure.com/cake-contrib/Cake.Issues/_apis/build/status%2Fcake-contrib.Cake.Issues?branchName=develop&jobName=Build%20%26%20Unit%20Tests&configuration=Build%20%26%20Unit%20Tests%20Windows)](https://dev.azure.com/cake-contrib/Cake.Issues/_build/latest?definitionId=2&branchName=develop)|[![Build Status](https://dev.azure.com/cake-contrib/Cake.Issues/_apis/build/status%2Fcake-contrib.Cake.Issues?branchName=master&jobName=Build%20%26%20Unit%20Tests&configuration=Build%20%26%20Unit%20Tests%20Windows)](https://dev.azure.com/cake-contrib/Cake.Issues/_build/latest?definitionId=2&branchName=master)|
|Azure Pipelines|N/A|Ubuntu|[![Build Status](https://dev.azure.com/cake-contrib/Cake.Issues/_apis/build/status%2Fcake-contrib.Cake.Issues?branchName=develop&jobName=Build%20%26%20Unit%20Tests&configuration=Build%20%26%20Unit%20Tests%20Ubuntu)](https://dev.azure.com/cake-contrib/Cake.Issues/_build/latest?definitionId=2&branchName=develop)|[![Build Status](https://dev.azure.com/cake-contrib/Cake.Issues/_apis/build/status%2Fcake-contrib.Cake.Issues?branchName=master&jobName=Build%20%26%20Unit%20Tests&configuration=Build%20%26%20Unit%20Tests%20Ubuntu)](https://dev.azure.com/cake-contrib/Cake.Issues/_build/latest?definitionId=2&branchName=master)|
|Azure Pipelines|N/A|macOS|[![Build Status](https://dev.azure.com/cake-contrib/Cake.Issues/_apis/build/status%2Fcake-contrib.Cake.Issues?branchName=develop&jobName=Build%20%26%20Unit%20Tests&configuration=Build%20%26%20Unit%20Tests%20macOS)](https://dev.azure.com/cake-contrib/Cake.Issues/_build/latest?definitionId=2&branchName=develop)|[![Build Status](https://dev.azure.com/cake-contrib/Cake.Issues/_apis/build/status%2Fcake-contrib.Cake.Issues?branchName=master&jobName=Build%20%26%20Unit%20Tests&configuration=Build%20%26%20Unit%20Tests%20macOS)](https://dev.azure.com/cake-contrib/Cake.Issues/_build/latest?definitionId=2&branchName=master)|
|GitHub Actions|N/A|Ubuntu|[![Build and tests](https://github.com/cake-contrib/Cake.Issues/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/cake-contrib/Cake.Issues/actions/workflows/build.yml)|[![Build and tests](https://github.com/cake-contrib/Cake.Issues/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/cake-contrib/Cake.Issues/actions/workflows/build.yml)|

## Integration Tests Cake.Issues.GitRepository

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ Task("Build")
.Combine("src")
.CombineWithFilePath("ClassLibrary1.sln");

#if NETCOREAPP
DotNetRestore(solutionFile.FullPath);

var settings =
Expand All @@ -55,18 +54,6 @@ Task("Build")
{
MSBuildSettings = settings
});
#else
NuGetRestore(solutionFile);

var settings =
new MSBuildSettings()
.WithTarget("Rebuild")
.WithLogger(
Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll").FullPath,
"BinaryLogger",
msBuildLogPath.FullPath);
MSBuild(solutionFile, settings);
#endif

data.AddIssues(
ReadIssues(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration>
<packageSources>
<clear />
<add key="Integration" value="../../BuildArtifacts/Packages/NuGet" />
<add key="Integration" value="../../../BuildArtifacts/Packages/NuGet" />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<disabledPackageSources>
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit b1f7af7

Please sign in to comment.