From 16d085781a38443f29890b7415809c7aeedbddbf Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 05:29:20 +0530 Subject: [PATCH 01/17] initial version --- .github/workflows/scanf_dev.yml | 77 ++------------------------------- 1 file changed, 3 insertions(+), 74 deletions(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index 2de2cc5..1177740 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -1,41 +1,3 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -# This workflow will build, test, sign and package a WPF or Windows Forms desktop application -# built on .NET Core. -# To learn how to migrate your existing application to .NET Core, -# refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework -# -# To configure this workflow: -# -# 1. Configure environment variables -# GitHub sets default environment variables for every workflow run. -# Replace the variables relative to your project in the "env" section below. -# -# 2. Signing -# Generate a signing certificate in the Windows Application -# Packaging Project or add an existing signing certificate to the project. -# Next, use PowerShell to encode the .pfx file using Base64 encoding -# by running the following Powershell script to generate the output string: -# -# $pfx_cert = Get-Content '.\SigningCertificate.pfx' -Encoding Byte -# [System.Convert]::ToBase64String($pfx_cert) | Out-File 'SigningCertificate_Encoded.txt' -# -# Open the output file, SigningCertificate_Encoded.txt, and copy the -# string inside. Then, add the string to the repo as a GitHub secret -# and name it "Base64_Encoded_Pfx." -# For more information on how to configure your signing certificate for -# this workflow, refer to https://github.com/microsoft/github-actions-for-desktop-apps#signing -# -# Finally, add the signing certificate password to the repo as a secret and name it "Pfx_Key". -# See "Build the Windows Application Packaging project" below to see how the secret is used. -# -# For more information on GitHub Actions, refer to https://github.com/features/actions -# For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications, -# refer to https://github.com/microsoft/github-actions-for-desktop-apps - name: .NET Core Desktop on: @@ -56,10 +18,8 @@ jobs: # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on env: - Solution_Name: your-solution-name # Replace with your solution name, i.e. MyWpfApp.sln. - Test_Project_Path: your-test-project-path # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. - Wap_Project_Directory: your-wap-project-directory-name # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package. - Wap_Project_Path: your-wap-project-path # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj. + Solution_Name: src\Scanf\scanf.sln # Replace with your solution name, i.e. MyWpfApp.sln. + Test_Project_Path: src\Scanf\Scanf\Scanf.Test\Scanf.Test.csproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. steps: - name: Checkout @@ -81,35 +41,4 @@ jobs: - name: Execute unit tests run: dotnet test - # Restore the application to populate the obj folder with RuntimeIdentifiers - - name: Restore the application - run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration - env: - Configuration: ${{ matrix.configuration }} - - # Decode the base 64 encoded pfx and save the Signing_Certificate - - name: Decode the pfx - run: | - $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}") - $certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath GitHubActionsWorkflow.pfx - [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) - - # Create the app package by building and packaging the Windows Application Packaging project - - name: Create the app package - run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }} - env: - Appx_Bundle: Always - Appx_Bundle_Platforms: x86|x64 - Appx_Package_Build_Mode: StoreUpload - Configuration: ${{ matrix.configuration }} - - # Remove the pfx - - name: Remove the pfx - run: Remove-Item -path $env:Wap_Project_Directory\$env:Signing_Certificate - - # Upload the MSIX package: https://github.com/marketplace/actions/upload-artifact - - name: Upload build artifacts - uses: actions/upload-artifact@v2 - with: - name: MSIX Package - path: ${{ env.Wap_Project_Directory }}\AppPackages + From 8aee623a59f4879ca1c10892176ad2ac56c168d2 Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 05:35:13 +0530 Subject: [PATCH 02/17] build --- .github/workflows/scanf_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index 1177740..b9f27d4 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -35,7 +35,7 @@ jobs: # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - name: Setup MSBuild.exe - uses: microsoft/setup-msbuild@2008f912f56e61277eefaac6d1888b750582aa16 + uses: dotnet build --configuration Release # Execute all unit tests in the solution - name: Execute unit tests From 4a12e90ef17e433c4dd612598c73aed412250304 Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 05:38:27 +0530 Subject: [PATCH 03/17] disabled unit test in build --- .github/workflows/scanf_dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index b9f27d4..08bd30c 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -38,7 +38,7 @@ jobs: uses: dotnet build --configuration Release # Execute all unit tests in the solution - - name: Execute unit tests - run: dotnet test + #- name: Execute unit tests + # run: dotnet test From d1209e949ad78141d4fbaf91b7d2b24ccb607298 Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 05:40:11 +0530 Subject: [PATCH 04/17] cleanup --- .github/workflows/scanf_dev.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index 08bd30c..2e89f37 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -32,10 +32,8 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.101 - - # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - - name: Setup MSBuild.exe - uses: dotnet build --configuration Release + - name: Build Web Api + run: dotnet build --configuration Release # Execute all unit tests in the solution #- name: Execute unit tests From 926b65c131fc50171e30763be64f642fcbc8b969 Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 05:44:55 +0530 Subject: [PATCH 05/17] working directory --- .github/workflows/scanf_dev.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index 2e89f37..2a21910 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -34,6 +34,7 @@ jobs: dotnet-version: 3.1.101 - name: Build Web Api run: dotnet build --configuration Release + working-directory: src\Scanf # Execute all unit tests in the solution #- name: Execute unit tests From 855754b812631416a8b321161d64f88601a8b686 Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 12:20:05 +0530 Subject: [PATCH 06/17] Update scanf_dev.yml --- .github/workflows/scanf_dev.yml | 43 +++++++++++++++------------------ 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index 2a21910..cf843c1 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -2,42 +2,39 @@ name: .NET Core Desktop on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: - build: - strategy: matrix: configuration: [Debug, Release] - runs-on: windows-latest # For a list of available runner types, refer to - # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on + runs-on: + windows-latest # For a list of available runner types, refer to + # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on env: - Solution_Name: src\Scanf\scanf.sln # Replace with your solution name, i.e. MyWpfApp.sln. - Test_Project_Path: src\Scanf\Scanf\Scanf.Test\Scanf.Test.csproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. + Solution_Name: src\Scanf\scanf.sln # Replace with your solution name, i.e. MyWpfApp.sln. + Test_Project_Path: src\Scanf\Scanf\Scanf.Test\Scanf.Test.csproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - # Install the .NET Core workload - - name: Install .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.101 - - name: Build Web Api - run: dotnet build --configuration Release - working-directory: src\Scanf + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + # Install the .NET Core workload + - name: Install .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + - name: Build Web Api + run: dotnet build --configuration Release .\src\Scanf\Scanf.Package\ + working-directory: src\Scanf # Execute all unit tests in the solution #- name: Execute unit tests # run: dotnet test - - From 8f1eed818d5e205ce0232d9256fc897460161ffa Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 12:26:22 +0530 Subject: [PATCH 07/17] Update scanf_dev.yml --- .github/workflows/scanf_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index cf843c1..9d4b077 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -32,7 +32,7 @@ jobs: with: dotnet-version: 3.1.101 - name: Build Web Api - run: dotnet build --configuration Release .\src\Scanf\Scanf.Package\ + run: dotnet build --configuration Release src\Scanf\Scanf.Package\ working-directory: src\Scanf # Execute all unit tests in the solution From 453fe752bd7c246a8d4f546f22b92dd37300eec4 Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 12:30:24 +0530 Subject: [PATCH 08/17] Update scanf_dev.yml --- .github/workflows/scanf_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index 9d4b077..a7f1539 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -32,7 +32,7 @@ jobs: with: dotnet-version: 3.1.101 - name: Build Web Api - run: dotnet build --configuration Release src\Scanf\Scanf.Package\ + run: dotnet build --configuration Release .\src\Scanf\Scanf\Scanf.Package\ working-directory: src\Scanf # Execute all unit tests in the solution From 999ee85e07b6de15c1fdf0d62d1989f4b21e3960 Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 12:46:56 +0530 Subject: [PATCH 09/17] Update scanf_dev.yml --- .github/workflows/scanf_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index a7f1539..c8804c0 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -33,7 +33,7 @@ jobs: dotnet-version: 3.1.101 - name: Build Web Api run: dotnet build --configuration Release .\src\Scanf\Scanf\Scanf.Package\ - working-directory: src\Scanf + # Execute all unit tests in the solution #- name: Execute unit tests From 87b78d9835dcc2ff9fedcdb8ea54836a4f3e9d06 Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 12:50:44 +0530 Subject: [PATCH 10/17] Update scanf_dev.yml --- .github/workflows/scanf_dev.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index c8804c0..85901ac 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -35,6 +35,6 @@ jobs: run: dotnet build --configuration Release .\src\Scanf\Scanf\Scanf.Package\ - # Execute all unit tests in the solution - #- name: Execute unit tests - # run: dotnet test + # Execute all unit tests in the solution + - name: Execute unit tests + run: dotnet test .\src\Scanf\Scanf.sln From 318c820cf549ef7583874ae27a465c163b77610b Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 13:05:10 +0530 Subject: [PATCH 11/17] Update scanf_dev.yml --- .github/workflows/scanf_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index 85901ac..ea99db5 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -30,7 +30,7 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.101 + dotnet-version: 2.0 - name: Build Web Api run: dotnet build --configuration Release .\src\Scanf\Scanf\Scanf.Package\ From 42a1b986581a3c55cac76fe1f7c90a6de735f382 Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 13:10:25 +0530 Subject: [PATCH 12/17] Update scanf_dev.yml --- .github/workflows/scanf_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index ea99db5..f6b1078 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -30,7 +30,7 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 2.0 + dotnet-version: '2.x' - name: Build Web Api run: dotnet build --configuration Release .\src\Scanf\Scanf\Scanf.Package\ From e30332e7020deb09e51766c4e7fe4adde1c9d750 Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 13:12:05 +0530 Subject: [PATCH 13/17] Update scanf_dev.yml --- .github/workflows/scanf_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index f6b1078..ce92d1b 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -30,7 +30,7 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: '2.x' + dotnet-version: '3.x' - name: Build Web Api run: dotnet build --configuration Release .\src\Scanf\Scanf\Scanf.Package\ From b746a37cdd789576b461de409b9e75d0f11f1f9a Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 13:13:35 +0530 Subject: [PATCH 14/17] Update scanf_dev.yml --- .github/workflows/scanf_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index ce92d1b..3939a5c 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -30,7 +30,7 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: '3.x' + dotnet-version: 3.1.100 - name: Build Web Api run: dotnet build --configuration Release .\src\Scanf\Scanf\Scanf.Package\ From edbd85ee3e33f6fdd41fc422079ddd7e5da40304 Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 13:19:34 +0530 Subject: [PATCH 15/17] Update scanf_dev.yml --- .github/workflows/scanf_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index 3939a5c..1480030 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -30,7 +30,7 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.100 + dotnet-version: 2.0.0 - name: Build Web Api run: dotnet build --configuration Release .\src\Scanf\Scanf\Scanf.Package\ From 926a3aaf1d714dfdc631379e914ac8af316150d1 Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 13:29:13 +0530 Subject: [PATCH 16/17] Update scanf_dev.yml --- .github/workflows/scanf_dev.yml | 35 +++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index 1480030..4306db8 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -7,7 +7,7 @@ on: branches: [main] jobs: - build: + BuildProject: strategy: matrix: configuration: [Debug, Release] @@ -30,11 +30,42 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 2.0.0 + dotnet-version: 3.1.100 - name: Build Web Api run: dotnet build --configuration Release .\src\Scanf\Scanf\Scanf.Package\ + # Execute all unit tests in the solution + - name: Execute unit tests + run: dotnet test .\src\Scanf\Scanf.sln + + Tests: + strategy: + matrix: + configuration: [Debug, Release] + + runs-on: + windows-latest # For a list of available runner types, refer to + # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on + + env: + Solution_Name: src\Scanf\scanf.sln # Replace with your solution name, i.e. MyWpfApp.sln. + Test_Project_Path: src\Scanf\Scanf\Scanf.Test\Scanf.Test.csproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + # Install the .NET Core workload + - name: Install .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 2.0.0 + + + # Execute all unit tests in the solution - name: Execute unit tests run: dotnet test .\src\Scanf\Scanf.sln From b03dd729261bf962ab7dfbff54896cf7c85e3dc8 Mon Sep 17 00:00:00 2001 From: Anu Viswan Date: Fri, 27 Nov 2020 13:32:10 +0530 Subject: [PATCH 17/17] Update scanf_dev.yml --- .github/workflows/scanf_dev.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/scanf_dev.yml b/.github/workflows/scanf_dev.yml index 4306db8..409eec2 100644 --- a/.github/workflows/scanf_dev.yml +++ b/.github/workflows/scanf_dev.yml @@ -35,9 +35,6 @@ jobs: run: dotnet build --configuration Release .\src\Scanf\Scanf\Scanf.Package\ - # Execute all unit tests in the solution - - name: Execute unit tests - run: dotnet test .\src\Scanf\Scanf.sln Tests: strategy: