Skip to content

ci: SHA-pin all action refs (unblocks 47 days of dead CI) #85

ci: SHA-pin all action refs (unblocks 47 days of dead CI)

ci: SHA-pin all action refs (unblocks 47 days of dead CI) #85

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
org-guard:
name: Verify Repository Organization
runs-on: ubuntu-latest
steps:
- name: Ensure repo is under rayketcham-lab
env:
REPO_OWNER: ${{ github.repository_owner }}
run: |
if [ "$REPO_OWNER" != "rayketcham-lab" ]; then
echo "::error::Repository must be under 'rayketcham-lab' organization, not '$REPO_OWNER'"
echo "This repo appears to be forked or mirrored to the wrong org."
exit 1
fi
echo "Repo is correctly under rayketcham-lab"
build:
name: Build Solution
runs-on: windows-latest
needs: org-guard
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Setup .NET
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: '8.0.x'
- name: Restore NuGet packages
run: dotnet restore Parcl.sln
- name: Build solution
run: dotnet build Parcl.sln --configuration Release --no-restore
- name: Run tests
run: dotnet test tests/Parcl.Core.Tests/Parcl.Core.Tests.csproj --configuration Release --no-restore --verbosity normal --filter "FullyQualifiedName!~RealCertE2E&FullyQualifiedName!~FindByEmail_ReturnsLatestValid&FullyQualifiedName!~Get_Expired_ReturnsNull"
- name: Verify strong names and token consistency
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$sn = "${env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\sn.exe"
& $sn -vf src\Parcl.Core\bin\Release\net48\Parcl.Core.dll
& $sn -vf src\Parcl.Addin\bin\Release\net48\Parcl.Addin.dll
$core = [System.Reflection.AssemblyName]::GetAssemblyName("src\Parcl.Core\bin\Release\net48\Parcl.Core.dll")
$addin = [System.Reflection.AssemblyName]::GetAssemblyName("src\Parcl.Addin\bin\Release\net48\Parcl.Addin.dll")
$ct = [BitConverter]::ToString($core.GetPublicKeyToken()) -replace '-',''
$at = [BitConverter]::ToString($addin.GetPublicKeyToken()) -replace '-',''
if ($ct.Length -eq 0) { throw "Parcl.Core is NOT strong-named" }
if ($ct -ne $at) { throw "PublicKeyToken mismatch: Core=$ct Addin=$at" }
Write-Host "Strong names verified: PublicKeyToken=$ct"
- name: Upload MSI installer
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: Parcl-Installer
path: src/Parcl.Installer/bin/Release/Parcl.Installer.msi
lint:
name: Code Quality
runs-on: windows-latest
needs: org-guard
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Setup .NET
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: '8.0.x'
- name: Install dotnet-format
run: dotnet tool install -g dotnet-format
- name: Check formatting
run: dotnet format Parcl.sln --verify-no-changes --verbosity diagnostic
continue-on-error: true