Skip to content

feat(keyring): wire --backend flag and keyring.backend config key #12

feat(keyring): wire --backend flag and keyring.backend config key

feat(keyring): wire --backend flag and keyring.backend config key #12

Workflow file for this run

name: Test Chocolatey Package
on:
pull_request:
paths:
- 'packaging/chocolatey/**'
- '.github/workflows/test-chocolatey.yml'
push:
branches: [main]
paths:
- 'packaging/chocolatey/**'
- '.github/workflows/test-chocolatey.yml'
jobs:
test-chocolatey:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Build binary for testing
run: go build -o packaging/chocolatey/tools/gro.exe ./cmd/gro
- name: Prepare test package
shell: pwsh
working-directory: packaging/chocolatey
run: |
# Replace placeholder version with test version (must not be prerelease)
(Get-Content google-readonly.nuspec) `
-replace '<version>0.0.0</version>', '<version>0.0.1</version>' |
Set-Content google-readonly.nuspec
# Create a simple install script that uses the local binary
# (the real script downloads from GitHub, but we test structure here)
@'
$ErrorActionPreference = 'Stop'
$toolsDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
# Binary is already in tools/ from CI build
Write-Host "google-readonly installed from local build for testing"
'@ | Set-Content tools/chocolateyInstall.ps1
- name: Pack Chocolatey package
shell: pwsh
working-directory: packaging/chocolatey
run: choco pack
- name: Install package locally
shell: pwsh
working-directory: packaging/chocolatey
run: choco install google-readonly -dv -s . --force
- name: Verify installation
shell: pwsh
run: |
Write-Host "Testing gro --version..."
gro --version
if ($LASTEXITCODE -ne 0) {
Write-Error "gro --version failed"
exit 1
}
Write-Host "gro is working!"
- name: Test uninstall
shell: pwsh
run: |
choco uninstall google-readonly -y
# Verify gro is no longer available
$groPath = Get-Command gro -ErrorAction SilentlyContinue
if ($groPath) {
Write-Error "gro should not be available after uninstall"
exit 1
}
Write-Host "Uninstall successful!"