Skip to content

Commit

Permalink
Merge pull request #183 from nils-a/release/4.0.0
Browse files Browse the repository at this point in the history
Release/4.0.0
  • Loading branch information
nils-a authored Nov 18, 2022
2 parents 8de53b6 + ed3b18a commit ee2c2df
Show file tree
Hide file tree
Showing 29 changed files with 1,278 additions and 1,296 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "0.38.4",
"version": "1.3.0",
"commands": [
"dotnet-cake"
]
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,20 @@ jobs:
WYAM_DEPLOY_REMOTE: ${{ github.event.repository.html_url }}

steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Checkout the repository
uses: actions/checkout@v3
- name: Fetch all tags and branches
run: git fetch --prune --unshallow
- uses: actions/setup-dotnet@v1.9.0
- uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: |
2.1.818
3.1.x
5.0.x
6.0.x
7.0.x
- name: Cache Tools
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .cake
key: ${{ runner.os }}-cake-${{ hashFiles('recipe.cake') }}
Expand All @@ -64,21 +65,19 @@ jobs:
with:
script-path: recipe.cake
target: CI
verbosity: Diagnostic
cake-version: 0.38.5
cake-bootstrap: true
cake-version: 1.3.0
- name: Upload Issues
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
if-no-files-found: warn
name: ${{ matrix.os }} Issues
path: |
BuildArtifacts/report.html
BuildArtifacts/**/coverlet/*.xml
- name: Upload Packages
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: runner.os == 'Windows'
with:
if-no-files-found: warn
name: package
path: BuildArtifacts/Packages/**/*
path: BuildArtifacts/Packages/**/*
21 changes: 8 additions & 13 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,27 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v1.9.0
- uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: |
2.1.818
3.1.x
5.0.x
6.0.x
dotnet-version: 7.0.x

- name: Cache Tools
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .cake
key: ${{ runner.os }}-cake-${{ hashFiles('recipe.cake') }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

Expand All @@ -67,8 +63,7 @@ jobs:
with:
script-path: recipe.cake
target: DotNetCore-Build
cake-version: 0.38.5
cake-bootstrap: true
cake-version: 1.3.0

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
7 changes: 3 additions & 4 deletions .github/workflows/publishDocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Fetch all tags and branches
run: git fetch --prune --unshallow

- name: Cache Tools
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: tools
key: ${{ runner.os }}-doc-tools-${{ hashFiles('recipe.cake') }}
Expand All @@ -32,5 +32,4 @@ jobs:
script-path: recipe.cake
target: Force-Publish-Documentation
verbosity: Diagnostic
cake-version: 0.38.5
cake-bootstrap: true
cake-version: 1.3.0
4 changes: 1 addition & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ function Run([string[]]$arguments) {

Run tool, restore

Run cake, recipe.cake, --bootstrap

$arguments = @("cake"; "recipe.cake")
$arguments += @($args)

Run $arguments
Run $arguments
2 changes: 0 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/bash
dotnet tool restore

dotnet cake recipe.cake --bootstrap

dotnet cake recipe.cake "$@"
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "7.0.100",
"rollForward": "latestFeature"
}
}
6 changes: 2 additions & 4 deletions recipe.cake
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#load nuget:?package=Cake.Recipe&version=2.2.1

// Workaround for https://github.com/cake-contrib/Cake.Recipe/issues/854
#tool nuget:?package=NuGet.CommandLine&version=5.8.1
#load nuget:?package=Cake.Recipe&version=3.0.1

Environment.SetVariableNames();

Expand All @@ -16,6 +13,7 @@ BuildParameters.SetParameters(
appVeyorAccountName: "cakecontrib",
shouldRunDotNetCorePack: true,
shouldUseDeterministicBuilds: true,
shouldRunInspectCode: false, // we're shipping a custom version of it below
preferredBuildProviderType: BuildProviderType.GitHubActions,
preferredBuildAgentOperatingSystem: PlatformFamily.Linux);

Expand Down
2 changes: 2 additions & 0 deletions src/.git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# file-scoped-namespaces
d52d4f9cf189ccdb3c9a6a3b002e6717725a254e
103 changes: 51 additions & 52 deletions src/Cake.AsciiDoctorJ.Tests/AsciiDoctorJAliasesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,58 @@

using Xunit;

namespace Cake.AsciiDoctorJ.Tests
namespace Cake.AsciiDoctorJ.Tests;

public class AsciiDoctorJAliasesTests
{
public class AsciiDoctorJAliasesTests
[Fact]
public void Should_throw_if_settings_are_null()
{
var fixture = new AsciiDoctorJAliasesFixture();
fixture.GivenSettingsIsNull();

Action action = () => fixture.Run();
action.ShouldThrow<ArgumentNullException>().ParamName.ShouldBe("settings");
}

[Fact]
public void Should_not_throw_if_settings_are_set()
{
var fixture = new AsciiDoctorJAliasesFixture();

var actual = fixture.Run();

actual.Args.ShouldBe("");
}

[Fact]
public void Should_not_throw_if_settings_are_null_but_called_fluently()
{
[Fact]
public void Should_throw_if_settings_are_null()
{
var fixture = new AsciiDoctorJAliasesFixture();
fixture.GivenSettingsIsNull();

Action action = () => fixture.Run();
action.ShouldThrow<ArgumentNullException>().ParamName.ShouldBe("settings");
}

[Fact]
public void Should_not_throw_if_settings_are_set()
{
var fixture = new AsciiDoctorJAliasesFixture();

var actual = fixture.Run();

actual.Args.ShouldBe("");
}

[Fact]
public void Should_not_throw_if_settings_are_null_but_called_fluently()
{
var fixture = new AsciiDoctorJAliasesFixture();
fixture.GivenSettingsIsNull();

var actual = fixture.RunFluent(x => { });

actual.Args.ShouldBe("");
}

[Fact]
public void Should_throw_if_context_is_null()
{
var fixture = new AsciiDoctorJAliasesFixture();
fixture.GivenContextIsNull();

Action action = () => fixture.Run();
action.ShouldThrow<ArgumentNullException>().ParamName.ShouldBe("context");
}

[Fact]
public void Should_throw_if_context_is_null_called_fluently()
{
var fixture = new AsciiDoctorJAliasesFixture();
fixture.GivenContextIsNull();

Action action = () => fixture.RunFluent(x => { });
action.ShouldThrow<ArgumentNullException>().ParamName.ShouldBe("context");
}
var fixture = new AsciiDoctorJAliasesFixture();
fixture.GivenSettingsIsNull();

var actual = fixture.RunFluent(x => { });

actual.Args.ShouldBe("");
}

[Fact]
public void Should_throw_if_context_is_null()
{
var fixture = new AsciiDoctorJAliasesFixture();
fixture.GivenContextIsNull();

Action action = () => fixture.Run();
action.ShouldThrow<ArgumentNullException>().ParamName.ShouldBe("context");
}

[Fact]
public void Should_throw_if_context_is_null_called_fluently()
{
var fixture = new AsciiDoctorJAliasesFixture();
fixture.GivenContextIsNull();

Action action = () => fixture.RunFluent(x => { });
action.ShouldThrow<ArgumentNullException>().ParamName.ShouldBe("context");
}
}
Loading

0 comments on commit ee2c2df

Please sign in to comment.