Skip to content

Add native-store tests, split EnumerateKeys, bump to 2.0.0 #6

Add native-store tests, split EnumerateKeys, bump to 2.0.0

Add native-store tests, split EnumerateKeys, bump to 2.0.0 #6

Workflow file for this run

name: Cross-platform verification
on:
push:
branches: [main, develop]
paths-ignore:
- "**.md"
- ".github/ISSUE_TEMPLATE/**"
- ".github/pull_request_template.md"
pull_request:
paths-ignore:
- "**.md"
- ".github/ISSUE_TEMPLATE/**"
- ".github/pull_request_template.md"
workflow_dispatch:
concurrency:
group: cross-platform-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
verify:
name: Build & Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET SDK 10.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Install libsecret + dbus + gnome-keyring (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libsecret-1-0 dbus dbus-x11 gnome-keyring
- name: Restore
run: dotnet restore CredentialCache.sln
- name: Build
run: dotnet build CredentialCache.sln --configuration Release --no-restore
- name: Test (non-Linux)
if: runner.os != 'Linux'
run: dotnet test --project CredentialCache.Test/CredentialCache.Test.csproj --configuration Release --no-build
- name: Test (Linux, under dbus session with gnome-keyring)
if: runner.os == 'Linux'
shell: bash
# The LinuxSecretServiceCredentialStore tests need a running Secret
# Service. We spin up a private dbus session, start gnome-keyring-daemon
# inside it, unlock with an empty password, then run the test runner
# within the same session so libsecret can reach the daemon.
run: |
dbus-run-session -- bash -c '
printf "\n" | gnome-keyring-daemon --unlock --components=secrets >/dev/null 2>&1 &
sleep 1
dotnet test --project CredentialCache.Test/CredentialCache.Test.csproj --configuration Release --no-build
'