updated .net version to 8.0 #25
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
name: run tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_call: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v1 | |
name: Checkout Code | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore src/Signer.Tests/Signer.Tests.csproj | |
- name: Decode test pfx | |
run: | | |
$pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.PFX_TEST_CERTIFICATE }}") | |
[IO.File]::WriteAllBytes("${{ github.workspace }}/Signer_TemporaryKey.pfx", $pfx_cert_byte) | |
- name: import test pfx | |
run: | | |
$SecurePassword=ConvertTo-SecureString ${{ secrets.PFX_TEST_PASSWORD }} –asplaintext –force | |
Import-PfxCertificate -FilePath ${{ github.workspace }}/Signer_TemporaryKey.pfx -CertStoreLocation Cert:\CurrentUser\My -Password $SecurePassword | |
# Execute all unit tests in the solution | |
- name: Execute unit tests | |
run: dotnet test src/Signer.Tests/Signer.Tests.csproj | |
# Remove the pfx | |
- name: Remove the pfx | |
run: Remove-Item -path ${{ github.workspace }}/Signer_TemporaryKey.pfx |