Skip to content

Commit 55329c9

Browse files
eabaAaronontheweb
andauthored
[fix] ‘bash\r’: No such file or directory Error (#34)
* [fix] `‘bash\r’: No such file or directory Error` * Update Akka.TestKit.MsTest.csproj Co-authored-by: Aaron Stannard <[email protected]>
1 parent 5ee9673 commit 55329c9

File tree

7 files changed

+146
-140
lines changed

7 files changed

+146
-140
lines changed

.github/workflows/pr_validation.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ jobs:
3131
name: windows-latest
3232
runs-on: windows-latest
3333
steps:
34-
- uses: actions/checkout@v2
34+
- uses: actions/checkout@v3
3535
- name: Make build.sh executable
3636
run: chmod +x ./build.sh
3737
- name: Make build.cmd executable
3838
run: chmod +x ./build.cmd
3939
- uses: actions/setup-dotnet@v1
4040
with:
41-
dotnet-version: 6.0.*
41+
dotnet-version: 7.0.*
4242
- name: Cache .nuke/temp, ~/.nuget/packages
43-
uses: actions/cache@v2
43+
uses: actions/cache@v3
4444
with:
4545
path: |
4646
.nuke/temp
@@ -60,29 +60,26 @@ jobs:
6060
name: ubuntu-latest
6161
runs-on: ubuntu-latest
6262
steps:
63-
- uses: actions/checkout@v2
63+
- uses: actions/checkout@v3
6464
- name: Make build.sh executable
6565
run: chmod +x ./build.sh
6666
- name: Make build.cmd executable
6767
run: chmod +x ./build.cmd
6868
- uses: actions/setup-dotnet@v1
6969
with:
70-
dotnet-version: 6.0.*
70+
dotnet-version: 7.0.*
7171
- name: Cache .nuke/temp, ~/.nuget/packages
72-
uses: actions/cache@v2
72+
uses: actions/cache@v3
7373
with:
7474
path: |
7575
.nuke/temp
7676
~/.nuget/packages
7777
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
7878
- name: Check format
7979
if: matrix.os == 'ubuntu-latest'
80-
run: |
81-
dotnet format --verify-no-changes --verbosity diagnostic
82-
- name: Test
83-
run: |
84-
find tests -name *.csproj | xargs -I % dotnet add % package coverlet.msbuild
85-
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov
80+
run: dotnet format --verify-no-changes --verbosity diagnostic
81+
- name: Run './build.cmd All'
82+
run: ./build.cmd All
8683
- name: Coveralls
8784
if: matrix.os == 'ubuntu-latest'
8885
uses: coverallsapp/github-action@master

.github/workflows/windows_release.yml

Lines changed: 56 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,56 @@
1-
# ------------------------------------------------------------------------------
2-
# <auto-generated>
3-
#
4-
# This code was generated.
5-
#
6-
# - To turn off auto-generation set:
7-
#
8-
# [CustomGitHubActions (AutoGenerate = false)]
9-
#
10-
# - To trigger manual generation invoke:
11-
#
12-
# nuke --generate-configuration GitHubActions_windows_release --host GitHubActions
13-
#
14-
# </auto-generated>
15-
# ------------------------------------------------------------------------------
16-
17-
name: windows_release
18-
19-
on:
20-
push:
21-
tags:
22-
- '*'
23-
24-
jobs:
25-
windows-latest:
26-
name: windows-latest
27-
runs-on: windows-latest
28-
steps:
29-
- uses: actions/checkout@v2
30-
- name: Make build.sh executable
31-
run: chmod +x ./build.sh
32-
- name: Make build.cmd executable
33-
run: chmod +x ./build.cmd
34-
- uses: actions/setup-dotnet@v1
35-
with:
36-
dotnet-version: 5.0.*
37-
- uses: actions/setup-dotnet@v1
38-
with:
39-
dotnet-version: 6.0.*
40-
- name: Cache .nuke/temp, ~/.nuget/packages
41-
uses: actions/cache@v2
42-
with:
43-
path: |
44-
.nuke/temp
45-
~/.nuget/packages
46-
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
47-
- name: Run './build.cmd NuGet'
48-
run: ./build.cmd NuGet
49-
env:
50-
Nuget_Key: ${{ secrets.NUGET_KEY }}
51-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1+
# ------------------------------------------------------------------------------
2+
# <auto-generated>
3+
#
4+
# This code was generated.
5+
#
6+
# - To turn off auto-generation set:
7+
#
8+
# [CustomGitHubActions (AutoGenerate = false)]
9+
#
10+
# - To trigger manual generation invoke:
11+
#
12+
# nuke --generate-configuration GitHubActions_windows_release --host GitHubActions
13+
#
14+
# </auto-generated>
15+
# ------------------------------------------------------------------------------
16+
17+
name: windows_release
18+
19+
on:
20+
push:
21+
tags:
22+
- '*'
23+
24+
jobs:
25+
windows-latest:
26+
name: windows-latest
27+
runs-on: windows-latest
28+
steps:
29+
- uses: actions/checkout@v3
30+
- name: Make build.sh executable
31+
run: chmod +x ./build.sh
32+
- name: Make build.cmd executable
33+
run: chmod +x ./build.cmd
34+
- uses: actions/setup-dotnet@v1
35+
with:
36+
dotnet-version: 7.0.*
37+
- name: Cache .nuke/temp, ~/.nuget/packages
38+
uses: actions/cache@v3
39+
with:
40+
path: |
41+
.nuke/temp
42+
~/.nuget/packages
43+
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
44+
- name: Check format
45+
if: matrix.os == 'ubuntu-latest'
46+
run: dotnet format --verify-no-changes --verbosity diagnostic
47+
- name: Run './build.cmd NuGet'
48+
run: ./build.cmd NuGet
49+
env:
50+
Nuget_Key: ${{ secrets.NUGET_KEY }}
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
- name: Coveralls
53+
if: matrix.os == 'ubuntu-latest'
54+
uses: coverallsapp/github-action@master
55+
with:
56+
github-token: ${ secrets.GITHUB_TOKEN }

build.sh

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
1-
#!/usr/bin/env bash
2-
3-
bash --version 2>&1 | head -n 1
4-
5-
set -eo pipefail
6-
SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
7-
8-
###########################################################################
9-
# CONFIGURATION
10-
###########################################################################
11-
12-
BUILD_PROJECT_FILE="$SCRIPT_DIR/build/_build.csproj"
13-
TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"
14-
15-
DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"
16-
DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
17-
DOTNET_CHANNEL="Current"
18-
19-
export DOTNET_CLI_TELEMETRY_OPTOUT=1
20-
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
21-
export DOTNET_MULTILEVEL_LOOKUP=0
22-
23-
###########################################################################
24-
# EXECUTION
25-
###########################################################################
26-
27-
function FirstJsonValue {
28-
perl -nle 'print $1 if m{"'"$1"'": "([^"]+)",?}' <<< "${@:2}"
29-
}
30-
31-
# If dotnet CLI is installed globally and it matches requested version, use for execution
32-
if [ -x "$(command -v dotnet)" ] && dotnet --version &>/dev/null; then
33-
export DOTNET_EXE="$(command -v dotnet)"
34-
else
35-
# Download install script
36-
DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh"
37-
mkdir -p "$TEMP_DIRECTORY"
38-
curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL"
39-
chmod +x "$DOTNET_INSTALL_FILE"
40-
41-
# If global.json exists, load expected version
42-
if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then
43-
DOTNET_VERSION=$(FirstJsonValue "version" "$(cat "$DOTNET_GLOBAL_FILE")")
44-
if [[ "$DOTNET_VERSION" == "" ]]; then
45-
unset DOTNET_VERSION
46-
fi
47-
fi
48-
49-
# Install by channel or version
50-
DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix"
51-
if [[ -z ${DOTNET_VERSION+x} ]]; then
52-
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path
53-
else
54-
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
55-
fi
56-
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
57-
fi
58-
59-
echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"
60-
61-
"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
62-
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"
1+
#!/usr/bin/env bash
2+
3+
bash --version 2>&1 | head -n 1
4+
5+
set -eo pipefail
6+
SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
7+
8+
###########################################################################
9+
# CONFIGURATION
10+
###########################################################################
11+
12+
BUILD_PROJECT_FILE="$SCRIPT_DIR/build/_build.csproj"
13+
TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"
14+
15+
DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"
16+
DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
17+
DOTNET_CHANNEL="Current"
18+
19+
export DOTNET_CLI_TELEMETRY_OPTOUT=1
20+
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
21+
export DOTNET_MULTILEVEL_LOOKUP=0
22+
23+
###########################################################################
24+
# EXECUTION
25+
###########################################################################
26+
27+
function FirstJsonValue {
28+
perl -nle 'print $1 if m{"'"$1"'": "([^"]+)",?}' <<< "${@:2}"
29+
}
30+
31+
# If dotnet CLI is installed globally and it matches requested version, use for execution
32+
if [ -x "$(command -v dotnet)" ] && dotnet --version &>/dev/null; then
33+
export DOTNET_EXE="$(command -v dotnet)"
34+
else
35+
# Download install script
36+
DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh"
37+
mkdir -p "$TEMP_DIRECTORY"
38+
curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL"
39+
chmod +x "$DOTNET_INSTALL_FILE"
40+
41+
# If global.json exists, load expected version
42+
if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then
43+
DOTNET_VERSION=$(FirstJsonValue "version" "$(cat "$DOTNET_GLOBAL_FILE")")
44+
if [[ "$DOTNET_VERSION" == "" ]]; then
45+
unset DOTNET_VERSION
46+
fi
47+
fi
48+
49+
# Install by channel or version
50+
DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix"
51+
if [[ -z ${DOTNET_VERSION+x} ]]; then
52+
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path
53+
else
54+
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
55+
fi
56+
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
57+
fi
58+
59+
echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"
60+
61+
"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
62+
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"

build/Build.CI.GitHubActions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected override GitHubActionsJob GetJobs(GitHubActionsImage image, IReadOnlyC
4343
{
4444
var job = base.GetJobs(image, relevantTargets);
4545
var newSteps = new List<GitHubActionsStep>(job.Steps);
46-
foreach (var version in new[] { "6.0.*" })
46+
foreach (var version in new[] { "7.0.*" })
4747
{
4848
newSteps.Insert(1, new GitHubActionsSetupDotNetStep
4949
{

build/_build.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net7.0</TargetFramework>
66
<RootNamespace></RootNamespace>
77
<NoWarn>CS0649;CS0169</NoWarn>
88
<NukeRootDirectory>..</NukeRootDirectory>

src/Akka.TestKit.MsTest.Tests/Akka.TestKit.MsTest.Tests.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77

@@ -12,4 +12,8 @@
1212
<ProjectReference Include="..\Akka.TestKit.MsTest\Akka.TestKit.MsTest.csproj" />
1313
</ItemGroup>
1414

15+
<ItemGroup>
16+
<PackageReference Update="FluentAssertions" Version="6.9.0" />
17+
</ItemGroup>
18+
1519
</Project>
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
5-
</PropertyGroup>
6-
7-
<ItemGroup>
8-
<PackageReference Include="Akka" Version="1.4.48" />
9-
<PackageReference Include="Akka.TestKit" Version="1.4.48" />
10-
</ItemGroup>
11-
12-
</Project>
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<PackageReference Include="Akka" Version="1.4.48" />
9+
<PackageReference Include="Akka.TestKit" Version="1.4.48" />
10+
</ItemGroup>
11+
12+
</Project>

0 commit comments

Comments
 (0)