-
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.
- Loading branch information
Showing
15 changed files
with
294 additions
and
67 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
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
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 |
---|---|---|
|
@@ -5,12 +5,13 @@ env: | |
OUTPUT_PATH: ${{ github.workspace }}/artifact | ||
ASSEMBLY_VERSION: 1.0.0.${{ github.run_number }} | ||
ADR_PROJECT_FILE: "adr-power-cli.csproj" | ||
# ADR_TESTPROJECT_FILE: "tests.csproj" | ||
ADR_TESTPROJECT_CORE_FILE: "adr-core-tests.csproj" | ||
ADR_TESTPROJECT_CLI_FILE: "adr-cli-tests.csproj" | ||
ADR_PROJECT_FILE_PATH: "./src/cli/adr-power-cli.csproj" | ||
# ADR_TESTPROJECT_FILE_PATH: "./src/adr.tests/tests.csproj" | ||
WINDOWS_RUNTIME: "win-x64" | ||
UBUNTU_RUNTIME: "linux-x64" | ||
CONFIGURATION: "Release" | ||
ADR_SOLUTION_FILE: "adr-power-cli.sln" | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -28,69 +29,81 @@ jobs: | |
|
||
- name: Fetch all history for all tags and branches | ||
run: git fetch --unshallow || true | ||
|
||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: "5.x" | ||
|
||
- name: Use GitVersion | ||
id: gitversion # step id used as reference for output values | ||
uses: gittools/actions/gitversion/[email protected] | ||
|
||
- run: | | ||
echo "Major: ${{ steps.gitversion.outputs.major }}" | ||
echo "Minor: ${{ steps.gitversion.outputs.minor }}" | ||
echo "Patch: ${{ steps.gitversion.outputs.patch }}" | ||
echo "PreReleaseTag: ${{ steps.gitversion.outputs.preReleaseTag }}" | ||
echo "PreReleaseTagWithDash: ${{ steps.gitversion.outputs.preReleaseTagWithDash }}" | ||
echo "PreReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }}" | ||
echo "PreReleaseNumber: ${{ steps.gitversion.outputs.preReleaseNumber }}" | ||
echo "WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.weightedPreReleaseNumber }}" | ||
echo "BuildMetaData: ${{ steps.gitversion.outputs.buildMetaData }}" | ||
echo "BuildMetaDataPadded: ${{ steps.gitversion.outputs.buildMetaDataPadded }}" | ||
echo "FullBuildMetaData: ${{ steps.gitversion.outputs.fullBuildMetaData }}" | ||
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}" | ||
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}" | ||
echo "LegacySemVer: ${{ steps.gitversion.outputs.legacySemVer }}" | ||
echo "LegacySemVerPadded: ${{ steps.gitversion.outputs.legacySemVerPadded }}" | ||
echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}" | ||
echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}" | ||
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}" | ||
echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}" | ||
echo "BranchName: ${{ steps.gitversion.outputs.branchName }}" | ||
echo "EscapedBranchName: ${{ steps.gitversion.outputs.escapedBranchName }}" | ||
echo "Sha: ${{ steps.gitversion.outputs.sha }}" | ||
echo "ShortSha: ${{ steps.gitversion.outputs.shortSha }}" | ||
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" | ||
echo "NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}" | ||
echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.nuGetPreReleaseTagV2 }}" | ||
echo "NuGetPreReleaseTag: ${{ steps.gitversion.outputs.nuGetPreReleaseTag }}" | ||
echo "VersionSourceSha: ${{ steps.gitversion.outputs.versionSourceSha }}" | ||
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}" | ||
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}" | ||
echo "UncommittedChanges: ${{ steps.gitversion.outputs.uncommittedChanges }}" | ||
echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}" | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
|
||
- name: Display dotnet version | ||
run: dotnet --version | ||
|
||
- name: Install dependencies | ||
run: dotnet restore | ||
|
||
- name: Build | ||
run: dotnet build ${{ env.ADR_PROJECT_FILE}} --runtime ${{ env.WINDOWS_RUNTIME }} --configuration ${{ env.CONFIGURATION }} -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} | ||
working-directory: ./src/cli | ||
|
||
# - name: Test | ||
# run: dotnet test ${{ env.ADR_TESTPROJECT_FILE }} --runtime ${{ env.WINDOWS_RUNTIME}} --verbosity normal | ||
# working-directory: ./src | ||
# working-directory: ${{ env.ADR_TESTPROJECT_FILE }} | ||
# | ||
# - name: Install GitVersion | ||
# uses: gittools/actions/gitversion/[email protected] | ||
# with: | ||
# versionSpec: "5.x" | ||
# | ||
# - name: Use GitVersion | ||
# id: gitversion # step id used as reference for output values | ||
# uses: gittools/actions/gitversion/[email protected] | ||
# | ||
# - run: | | ||
# echo "Major: ${{ steps.gitversion.outputs.major }}" | ||
# echo "Minor: ${{ steps.gitversion.outputs.minor }}" | ||
# echo "Patch: ${{ steps.gitversion.outputs.patch }}" | ||
# echo "PreReleaseTag: ${{ steps.gitversion.outputs.preReleaseTag }}" | ||
# echo "PreReleaseTagWithDash: ${{ steps.gitversion.outputs.preReleaseTagWithDash }}" | ||
# echo "PreReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }}" | ||
# echo "PreReleaseNumber: ${{ steps.gitversion.outputs.preReleaseNumber }}" | ||
# echo "WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.weightedPreReleaseNumber }}" | ||
# echo "BuildMetaData: ${{ steps.gitversion.outputs.buildMetaData }}" | ||
# echo "BuildMetaDataPadded: ${{ steps.gitversion.outputs.buildMetaDataPadded }}" | ||
# echo "FullBuildMetaData: ${{ steps.gitversion.outputs.fullBuildMetaData }}" | ||
# echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}" | ||
# echo "SemVer: ${{ steps.gitversion.outputs.semVer }}" | ||
# echo "LegacySemVer: ${{ steps.gitversion.outputs.legacySemVer }}" | ||
# echo "LegacySemVerPadded: ${{ steps.gitversion.outputs.legacySemVerPadded }}" | ||
# echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}" | ||
# echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}" | ||
# echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}" | ||
# echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}" | ||
# echo "BranchName: ${{ steps.gitversion.outputs.branchName }}" | ||
# echo "EscapedBranchName: ${{ steps.gitversion.outputs.escapedBranchName }}" | ||
# echo "Sha: ${{ steps.gitversion.outputs.sha }}" | ||
# echo "ShortSha: ${{ steps.gitversion.outputs.shortSha }}" | ||
# echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" | ||
# echo "NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}" | ||
# echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.nuGetPreReleaseTagV2 }}" | ||
# echo "NuGetPreReleaseTag: ${{ steps.gitversion.outputs.nuGetPreReleaseTag }}" | ||
# echo "VersionSourceSha: ${{ steps.gitversion.outputs.versionSourceSha }}" | ||
# echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}" | ||
# echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}" | ||
# echo "UncommittedChanges: ${{ steps.gitversion.outputs.uncommittedChanges }}" | ||
# echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}" | ||
# | ||
# - name: Setup .NET | ||
# uses: actions/setup-dotnet@v3 | ||
# with: | ||
# dotnet-version: ${{ env.DOTNET_VERSION }} | ||
# | ||
# - name: Display dotnet version | ||
# run: dotnet --version | ||
# | ||
# - name: Install dependencies | ||
# run: dotnet restore | ||
# | ||
# - name: Build | ||
# run: dotnet build ${{ env.ADR_PROJECT_FILE}} --runtime ${{ env.WINDOWS_RUNTIME }} --configuration ${{ env.CONFIGURATION }} -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} | ||
# working-directory: ./src/cli | ||
# | ||
# run-tests: | ||
# name: Run tests | ||
# needs: build | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# | ||
# - name: Execute unit testsss | ||
# run: dotnet test ./adr-power-cli.sln | ||
# | ||
# # Execute all unit tests in the solution | ||
# - name: Execute unit tests | ||
# run: dotnet test adr-power-cli.sln | ||
# | ||
# - name: Test Core | ||
# run: dotnet test tests/adr-core-tests/adr-core-tests.csproj --verbosity normal | ||
# working-directory: tests | ||
|
||
# publish_windows: | ||
# name: Publish Windows package | ||
|
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,40 @@ | ||
# This workflow will build a .NET project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | ||
|
||
name: .NET build and test | ||
|
||
env: | ||
DOTNET_VERSION: "8.x" | ||
OUTPUT_PATH: ${{ github.workspace }}/artifact | ||
ASSEMBLY_VERSION: 1.0.0.${{ github.run_number }} | ||
ADR_PROJECT_FILE: "adr-power-cli.csproj" | ||
ADR_TESTPROJECT_CORE_FILE: "adr-core-tests.csproj" | ||
ADR_TESTPROJECT_CLI_FILE: "adr-cli-tests.csproj" | ||
ADR_PROJECT_FILE_PATH: "./src/cli/adr-power-cli.csproj" | ||
WINDOWS_RUNTIME: "win-x64" | ||
UBUNTU_RUNTIME: "linux-x64" | ||
CONFIGURATION: "Release" | ||
ADR_SOLUTION_FILE: "adr-power-cli.sln" | ||
|
||
|
||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build --no-restore --configuration ${{ env.CONFIGURATION }} | ||
- name: Test | ||
run: dotnet test --no-build --verbosity normal |
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,41 @@ | ||
# This workflow will build a .NET project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | ||
|
||
name: .NET build and release | ||
|
||
env: | ||
DOTNET_VERSION: "8.x" | ||
OUTPUT_PATH: ${{ github.workspace }}/artifact | ||
ASSEMBLY_VERSION: 1.0.0.${{ github.run_number }} | ||
ADR_PROJECT_FILE: "adr-power-cli.csproj" | ||
ADR_TESTPROJECT_CORE_FILE: "adr-core-tests.csproj" | ||
ADR_TESTPROJECT_CLI_FILE: "adr-cli-tests.csproj" | ||
ADR_PROJECT_FILE_PATH: "./src/cli/adr-power-cli.csproj" | ||
WINDOWS_RUNTIME: "win-x64" | ||
UBUNTU_RUNTIME: "linux-x64" | ||
CONFIGURATION: "Release" | ||
ADR_SOLUTION_FILE: "adr-power-cli.sln" | ||
|
||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 8.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build --no-restore | ||
- name: Test | ||
run: dotnet test --no-build --verbosity normal |
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
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
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 @@ | ||
global using NUnit.Framework; |
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,16 @@ | ||
namespace adr_cli_tests | ||
{ | ||
public class Tests | ||
{ | ||
[SetUp] | ||
public void Setup() | ||
{ | ||
} | ||
|
||
[Test] | ||
public void Test1() | ||
{ | ||
Assert.Pass(); | ||
} | ||
} | ||
} |
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,25 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<RootNamespace>adr_cli_tests</RootNamespace> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" /> | ||
<PackageReference Include="NUnit" Version="3.13.3" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" /> | ||
<PackageReference Include="NUnit.Analyzers" Version="3.6.1" /> | ||
<PackageReference Include="coverlet.collector" Version="6.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\cli\adr-power-cli.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Binary file added
BIN
+1.46 KB
tests/adr-cli-tests/bin/Debug/net8.0/CoverletSourceRootsMapping_adr-cli-tests
Binary file not shown.
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 @@ | ||
global using NUnit.Framework; |
Oops, something went wrong.