-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Corrected workflow folder name Reduce the runners Correct the script name re-add other runners
- Loading branch information
Showing
2 changed files
with
84 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,40 @@ | ||
name: build | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
- "feature/**" | ||
- "release/**" | ||
- "hotfix/**" | ||
tags: | ||
- "*" | ||
paths-ignore: | ||
- "README.md" | ||
pull_request: | ||
|
||
on: [push] | ||
jobs: | ||
check-bats-version: | ||
runs-on: ubuntu-latest | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ windows-2022, ubuntu-22.04, macos-12 ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
- name: Checkout the repository | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Fetch all tags and branches | ||
run: git fetch --prune --unshallow | ||
- uses: actions/[email protected] | ||
with: | ||
dotnet-version: | | ||
6.0 | ||
7.0 | ||
8.0 | ||
- name: Build project | ||
uses: cake-build/[email protected] | ||
with: | ||
node-version: '14' | ||
- run: npm install -g bats | ||
- run: bats -v | ||
script-path: build.cake | ||
target: Build-And-Test | ||
verbosity: Diagnostic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// ARGUMENTS | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
var target = Argument("target", "Default"); | ||
var configuration = Argument("configuration", "Release"); | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// TASKS | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
//Todo: Add test for DisableTokenReplacement | ||
|
||
Task("Build") | ||
.Does(() => | ||
{ | ||
DotNetClean("./src/Cake.grate/Cake.grate.csproj"); | ||
|
||
var settings = new DotNetBuildSettings | ||
{ | ||
Configuration = configuration | ||
}; | ||
|
||
DotNetBuild("./src/Cake.grate/Cake.grate.csproj", settings); | ||
}); | ||
|
||
Task("Test") | ||
.Does(() => | ||
{ | ||
DotNetTest("./src/Cake.grate.Tests/Cake.grate.Tests.csproj"); | ||
}); | ||
|
||
Task("Build-And-Test") | ||
.IsDependentOn("Build") | ||
.IsDependentOn("Test"); | ||
|
||
|
||
Task("Default") | ||
.Does(() => | ||
{ | ||
Information(@"The following tasks are available: | ||
Build-And-Test: Builds the Addin and runs the Unit Tests"); | ||
}); | ||
|
||
|
||
RunTarget(target); |