Skip to content

Commit

Permalink
Add only unit test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
IT-VBFK committed Jan 10, 2023
1 parent 82c37b1 commit 7a50778
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [CustomGitHubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_unit-tests --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: unit-tests

on: [push, pull_request]

jobs:
ubuntu-22_04:
name: ubuntu-22_04
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
2.1.x
3.1.x
6.0.x
7.0.x
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd UnitTests'
run: ./build.cmd UnitTests
macos-12:
name: macos-12
runs-on: macos-12
steps:
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
2.1.x
3.1.x
6.0.x
7.0.x
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd UnitTests'
run: ./build.cmd UnitTests
16 changes: 16 additions & 0 deletions Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@
PublishArtifacts = true,
AutoGenerate = true,
FetchDepth = 0)]
[CustomGitHubActions(
name: "unit-tests",
GitHubActionsImage.Ubuntu2204,
GitHubActionsImage.MacOs12,
On = new[]
{
GitHubActionsTrigger.Push,
GitHubActionsTrigger.PullRequest
},
InvokedTargets = new[]
{
nameof(UnitTests)
},
AutoGenerate = true,
FetchDepth = 0
)]
class Build : NukeBuild
{
/* Support plugins are available for:
Expand Down

0 comments on commit 7a50778

Please sign in to comment.