Skip to content

fixed test path

fixed test path #32

Workflow file for this run

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: 8.0.x
- name: Restore dependencies
run: |
dotnet restore src/AuthenticodeExaminer.Tests./AuthenticodeExaminer.Tests.csproj
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/AuthenticodeExaminer.Tests/AuthenticodeExaminer.Tests.csproj
dotnet test src/Signer.Tests/Signer.Tests.csproj
# Remove the pfx
- name: Remove the pfx
run: Remove-Item -path ${{ github.workspace }}/Signer_TemporaryKey.pfx