From aeba18c5dc15d73d024c5c0a503cdce126f28227 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Tue, 1 Jun 2021 15:40:38 -0700 Subject: [PATCH 01/14] Create yml file for github build action --- .github/workflows/dotnet3.1Build.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/dotnet3.1Build.yml diff --git a/.github/workflows/dotnet3.1Build.yml b/.github/workflows/dotnet3.1Build.yml new file mode 100644 index 00000000..867f5e05 --- /dev/null +++ b/.github/workflows/dotnet3.1Build.yml @@ -0,0 +1,32 @@ +name: CodingGuidelines Build + +on: + push: + branches: + - main +env: + version: 0.1.9 +jobs: + build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: microsoft/setup-msbuild@v1.0.2 + - uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.x + - name: Use latest NuGet + uses: nuget/setup-nuget@v1 + - name: NuGet Restore + run: nuget restore **/*.sln + - name: Build + run: msbuild 'IntelliTect.Analyzer.sln' /p:configuration='Release' /p:Version=${{ env.version }} + - name: Test + run: dotnet test **/*.Tests.csproj + - name: dotnet pack + run: dotnet pack -p:Version="${{ env.version }}-ci-${{ github.run_id }}" -o ${{ github.workspace }} + shell: powershell + - uses: actions/upload-artifact@v2 + with: + path: ${{ github.workspace }} + name: drop \ No newline at end of file From 5bcbf2ec0cc37bdf08e6cda86223eb5961430d9f Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Tue, 1 Jun 2021 15:42:23 -0700 Subject: [PATCH 02/14] Update build on --- .github/workflows/dotnet3.1Build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet3.1Build.yml b/.github/workflows/dotnet3.1Build.yml index 867f5e05..d6cfdfe6 100644 --- a/.github/workflows/dotnet3.1Build.yml +++ b/.github/workflows/dotnet3.1Build.yml @@ -2,8 +2,11 @@ name: CodingGuidelines Build on: push: - branches: - - main + branches: [ main ] + pull_request: + branches: [ main ] + schedule: + - cron: 0 6 * * 1 env: version: 0.1.9 jobs: From e05c88ff7861efbafd237826efe31805b1d030a0 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Tue, 1 Jun 2021 15:47:22 -0700 Subject: [PATCH 03/14] Add pwd --- .github/workflows/dotnet3.1Build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet3.1Build.yml b/.github/workflows/dotnet3.1Build.yml index d6cfdfe6..784c679f 100644 --- a/.github/workflows/dotnet3.1Build.yml +++ b/.github/workflows/dotnet3.1Build.yml @@ -20,8 +20,10 @@ jobs: dotnet-version: 3.1.x - name: Use latest NuGet uses: nuget/setup-nuget@v1 + - name: Get Directory + run: pwd - name: NuGet Restore - run: nuget restore **/*.sln + run: nuget restore **\*.sln - name: Build run: msbuild 'IntelliTect.Analyzer.sln' /p:configuration='Release' /p:Version=${{ env.version }} - name: Test From cc552dd320152db0b5e33c11bb9ccc114e5ca3b3 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Tue, 1 Jun 2021 21:36:13 -0700 Subject: [PATCH 04/14] Switch to dotnet restore --- .github/workflows/dotnet3.1Build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet3.1Build.yml b/.github/workflows/dotnet3.1Build.yml index 784c679f..702b26f4 100644 --- a/.github/workflows/dotnet3.1Build.yml +++ b/.github/workflows/dotnet3.1Build.yml @@ -22,12 +22,14 @@ jobs: uses: nuget/setup-nuget@v1 - name: Get Directory run: pwd - - name: NuGet Restore - run: nuget restore **\*.sln + - name: Dotnet Restore dependencies + run: dotnet restore - name: Build run: msbuild 'IntelliTect.Analyzer.sln' /p:configuration='Release' /p:Version=${{ env.version }} + # - name: Build + # run: dotnet build --no-restore - name: Test - run: dotnet test **/*.Tests.csproj + run: dotnet test --no-build --verbosity normal - name: dotnet pack run: dotnet pack -p:Version="${{ env.version }}-ci-${{ github.run_id }}" -o ${{ github.workspace }} shell: powershell From c002326c93f1ab89d7d3de8c9e78273cf0d84605 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Tue, 1 Jun 2021 21:39:11 -0700 Subject: [PATCH 05/14] Use dotnet build over msbuild --- .github/workflows/dotnet3.1Build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet3.1Build.yml b/.github/workflows/dotnet3.1Build.yml index 702b26f4..df79bbd9 100644 --- a/.github/workflows/dotnet3.1Build.yml +++ b/.github/workflows/dotnet3.1Build.yml @@ -15,7 +15,8 @@ jobs: steps: - uses: actions/checkout@v2 - uses: microsoft/setup-msbuild@v1.0.2 - - uses: actions/setup-dotnet@v1 + - name: Setup .NET + uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.x - name: Use latest NuGet @@ -25,9 +26,7 @@ jobs: - name: Dotnet Restore dependencies run: dotnet restore - name: Build - run: msbuild 'IntelliTect.Analyzer.sln' /p:configuration='Release' /p:Version=${{ env.version }} - # - name: Build - # run: dotnet build --no-restore + run: dotnet build --no-restore - name: Test run: dotnet test --no-build --verbosity normal - name: dotnet pack From 3d651cccf5cf66e01d2bee9491b1c94c3f70f22f Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Thu, 3 Jun 2021 09:39:13 -0700 Subject: [PATCH 06/14] Apply changes and recommendations --- .github/workflows/dotnet3.1Build.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/dotnet3.1Build.yml b/.github/workflows/dotnet3.1Build.yml index df79bbd9..b9ca0fae 100644 --- a/.github/workflows/dotnet3.1Build.yml +++ b/.github/workflows/dotnet3.1Build.yml @@ -5,33 +5,28 @@ on: branches: [ main ] pull_request: branches: [ main ] - schedule: - - cron: 0 6 * * 1 env: version: 0.1.9 jobs: build: runs-on: windows-latest + strategy: + matrix: + dotnet-version: ['3.1.x', '5.0.x' ] steps: - uses: actions/checkout@v2 - - uses: microsoft/setup-msbuild@v1.0.2 - - name: Setup .NET + - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.x - - name: Use latest NuGet - uses: nuget/setup-nuget@v1 + dotnet-version: ${{ matrix.dotnet-version }} - name: Get Directory run: pwd - - name: Dotnet Restore dependencies - run: dotnet restore - name: Build - run: dotnet build --no-restore + run: dotnet build -p:Version="${{ env.version }}" - name: Test run: dotnet test --no-build --verbosity normal - name: dotnet pack - run: dotnet pack -p:Version="${{ env.version }}-ci-${{ github.run_id }}" -o ${{ github.workspace }} - shell: powershell + run: dotnet pack -p:Version="${{ env.version }}-ci-${{ github.run_number }}" -o ${{ github.workspace }} - uses: actions/upload-artifact@v2 with: path: ${{ github.workspace }} From bf83fe5eb4c6209a6f4cc9abab55a77cc5feffb9 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Thu, 3 Jun 2021 09:59:40 -0700 Subject: [PATCH 07/14] Point to just nuget package Target just 5.0 --- .github/workflows/dotnet3.1Build.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dotnet3.1Build.yml b/.github/workflows/dotnet3.1Build.yml index b9ca0fae..ef8d7878 100644 --- a/.github/workflows/dotnet3.1Build.yml +++ b/.github/workflows/dotnet3.1Build.yml @@ -10,15 +10,12 @@ env: jobs: build: runs-on: windows-latest - strategy: - matrix: - dotnet-version: ['3.1.x', '5.0.x' ] steps: - uses: actions/checkout@v2 - - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} + - name: Setup .NET Core SDK 5.0 uses: actions/setup-dotnet@v1 with: - dotnet-version: ${{ matrix.dotnet-version }} + dotnet-version: '5.0.x' - name: Get Directory run: pwd - name: Build @@ -29,5 +26,5 @@ jobs: run: dotnet pack -p:Version="${{ env.version }}-ci-${{ github.run_number }}" -o ${{ github.workspace }} - uses: actions/upload-artifact@v2 with: - path: ${{ github.workspace }} + path: ${{ github.workspace }}/*.nupkg name: drop \ No newline at end of file From 14cf0de55f5f0866db54c4d86652fbbbfe2f138d Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Fri, 4 Jun 2021 16:06:20 -0700 Subject: [PATCH 08/14] Update dotnet targets --- .../workflows/{dotnet3.1Build.yml => dotnetBuild.yml} | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) rename .github/workflows/{dotnet3.1Build.yml => dotnetBuild.yml} (71%) diff --git a/.github/workflows/dotnet3.1Build.yml b/.github/workflows/dotnetBuild.yml similarity index 71% rename from .github/workflows/dotnet3.1Build.yml rename to .github/workflows/dotnetBuild.yml index ef8d7878..e0332ad8 100644 --- a/.github/workflows/dotnet3.1Build.yml +++ b/.github/workflows/dotnetBuild.yml @@ -12,14 +12,20 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - name: Setup .NET Core SDK 5.0 + - name: Setup .NET 5.0 uses: actions/setup-dotnet@v1 with: dotnet-version: '5.0.x' + - name: Setup .NET Core 3.1 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.x' - name: Get Directory run: pwd + - name: Install dependencies + run: dotnet restore - name: Build - run: dotnet build -p:Version="${{ env.version }}" + run: dotnet build -p:Version="${{ env.version }}" --no-restore - name: Test run: dotnet test --no-build --verbosity normal - name: dotnet pack From 2c7a255db389172eb6cc6168adbbe6c219deccf7 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Tue, 8 Jun 2021 14:18:54 -0700 Subject: [PATCH 09/14] Update dotnetBuild.yml --- .github/workflows/dotnetBuild.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnetBuild.yml b/.github/workflows/dotnetBuild.yml index e0332ad8..735b2a36 100644 --- a/.github/workflows/dotnetBuild.yml +++ b/.github/workflows/dotnetBuild.yml @@ -22,6 +22,10 @@ jobs: dotnet-version: '3.1.x' - name: Get Directory run: pwd + - name: Get Dotnet Version + run: dotnet --version + - name: Dotnet info + run: dotnet --info - name: Install dependencies run: dotnet restore - name: Build @@ -33,4 +37,4 @@ jobs: - uses: actions/upload-artifact@v2 with: path: ${{ github.workspace }}/*.nupkg - name: drop \ No newline at end of file + name: drop From 3f351bdbdbc7886aea0b7bd381b35bd86a276084 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Tue, 8 Jun 2021 14:49:20 -0700 Subject: [PATCH 10/14] Target 5.0 --- .github/workflows/dotnetBuild.yml | 6 +----- Directory.Build.props | 3 ++- .../IntelliTect.Analyzer.Integration.Tests.csproj | 1 - .../IntelliTect.Analyzer.Tests.csproj | 1 - .../IntelliTect.Analyzer/IntelliTect.Analyzer.csproj | 1 - 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dotnetBuild.yml b/.github/workflows/dotnetBuild.yml index 735b2a36..865976bf 100644 --- a/.github/workflows/dotnetBuild.yml +++ b/.github/workflows/dotnetBuild.yml @@ -16,10 +16,6 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: '5.0.x' - - name: Setup .NET Core 3.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '3.1.x' - name: Get Directory run: pwd - name: Get Dotnet Version @@ -37,4 +33,4 @@ jobs: - uses: actions/upload-artifact@v2 with: path: ${{ github.workspace }}/*.nupkg - name: drop + name: Intellitect.CodingGuidelines diff --git a/Directory.Build.props b/Directory.Build.props index 6341c7cd..f433cb6e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,7 @@  - true + net5.0 + 8.0 \ No newline at end of file diff --git a/IntelliTect.Analyzer/IntelliTect.Analyzer.Integration.Tests/IntelliTect.Analyzer.Integration.Tests.csproj b/IntelliTect.Analyzer/IntelliTect.Analyzer.Integration.Tests/IntelliTect.Analyzer.Integration.Tests.csproj index d3317feb..693d1c4b 100644 --- a/IntelliTect.Analyzer/IntelliTect.Analyzer.Integration.Tests/IntelliTect.Analyzer.Integration.Tests.csproj +++ b/IntelliTect.Analyzer/IntelliTect.Analyzer.Integration.Tests/IntelliTect.Analyzer.Integration.Tests.csproj @@ -1,7 +1,6 @@ - netcoreapp3.1 false diff --git a/IntelliTect.Analyzer/IntelliTect.Analyzer.Test/IntelliTect.Analyzer.Tests.csproj b/IntelliTect.Analyzer/IntelliTect.Analyzer.Test/IntelliTect.Analyzer.Tests.csproj index e47ec9e0..957fd4fc 100644 --- a/IntelliTect.Analyzer/IntelliTect.Analyzer.Test/IntelliTect.Analyzer.Tests.csproj +++ b/IntelliTect.Analyzer/IntelliTect.Analyzer.Test/IntelliTect.Analyzer.Tests.csproj @@ -1,7 +1,6 @@  - netcoreapp3.1 CA2007,CA1815,CA1303,CA1707,CA1305 diff --git a/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj b/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj index 404a8d21..6af2607d 100644 --- a/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj +++ b/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj @@ -1,7 +1,6 @@  - netstandard1.3 false From 3d780d262ea60956bb7f763ccc61129bf7cb0b51 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Tue, 8 Jun 2021 15:07:35 -0700 Subject: [PATCH 11/14] target analyzer to standard1.3 --- .../IntelliTect.Analyzer/IntelliTect.Analyzer.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj b/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj index 6af2607d..404a8d21 100644 --- a/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj +++ b/IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj @@ -1,6 +1,7 @@  + netstandard1.3 false From 2d1f08e0f6895e61c2ebc9f84ad3f66a21dc84e6 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Wed, 9 Jun 2021 10:13:36 -0700 Subject: [PATCH 12/14] Minor updates --- .github/workflows/dotnetBuild.yml | 11 +++++------ Directory.Build.props | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dotnetBuild.yml b/.github/workflows/dotnetBuild.yml index 865976bf..cdf57e0f 100644 --- a/.github/workflows/dotnetBuild.yml +++ b/.github/workflows/dotnetBuild.yml @@ -16,12 +16,11 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: '5.0.x' - - name: Get Directory - run: pwd - - name: Get Dotnet Version - run: dotnet --version - - name: Dotnet info - run: dotnet --info + - name: Get Build Information + run: | + pwd + dotnet --info + dotnet --version - name: Install dependencies run: dotnet restore - name: Build diff --git a/Directory.Build.props b/Directory.Build.props index f433cb6e..8d23ed7a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@  net5.0 - + true 8.0 \ No newline at end of file From a0c6e6cb8455b5d8c3dc86a60be7e93bd15b7885 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Wed, 9 Jun 2021 17:01:33 -0700 Subject: [PATCH 13/14] TargetFramework to TargetFrameworks --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 8d23ed7a..8b4c94e4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@  - net5.0 + net5.0 true 8.0 From 57eff6b608aadbbd2b3f16852682716d92e6bde7 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Wed, 9 Jun 2021 17:01:33 -0700 Subject: [PATCH 14/14] Revert "TargetFramework to TargetFrameworks" This reverts commit a0c6e6cb8455b5d8c3dc86a60be7e93bd15b7885. --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 8b4c94e4..8d23ed7a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@  - net5.0 + net5.0 true 8.0