feat(keyring): wire --backend flag and keyring.backend config key (#140) #13
This file contains hidden or 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: 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!" |