Upgrade git-remote-entire alongside entire #25
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: upgrade-smoke | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - ".github/workflows/upgrade-smoke.yml" | |
| - "cmd/entire-upgrade/**" | |
| - "internal/upgrade/**" | |
| - "internal/cli/**" | |
| - "go.mod" | |
| - "go.sum" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/upgrade-smoke.yml" | |
| - "cmd/entire-upgrade/**" | |
| - "internal/upgrade/**" | |
| - "internal/cli/**" | |
| - "go.mod" | |
| - "go.sum" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| homebrew: | |
| name: Homebrew install path | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: { go-version: "1.26" } | |
| - run: go build -o entire-upgrade ./cmd/entire-upgrade | |
| - name: Install Entire via Homebrew | |
| run: | | |
| brew tap entireio/tap | |
| for cask in entire entire@nightly; do | |
| if brew list --cask "$cask" >/dev/null 2>&1; then | |
| brew uninstall --cask "$cask" | |
| fi | |
| done | |
| brew install --cask entire | |
| entire --version | |
| - name: Exercise upgrade plugin | |
| env: | |
| # Authenticate the release-check API calls; the shared runner IP | |
| # blows past GitHub's unauthenticated 60/hr limit otherwise. | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: | | |
| set -o pipefail | |
| ./entire-upgrade --yes | tee stable.log | |
| grep -F "(homebrew install)" stable.log | |
| ./entire-upgrade --nightly --yes | tee nightly.log | |
| grep -F "(homebrew install)" nightly.log | |
| hash -r | |
| entire --version | |
| curl: | |
| name: install.sh path | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: { go-version: "1.26" } | |
| - run: go build -o entire-upgrade ./cmd/entire-upgrade | |
| - name: Configure isolated HOME | |
| run: | | |
| echo "HOME=$RUNNER_TEMP/entire-curl-home" >> "$GITHUB_ENV" | |
| echo "$RUNNER_TEMP/entire-curl-home/.local/bin" >> "$GITHUB_PATH" | |
| - name: Install Entire via install.sh | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: | | |
| set -o pipefail | |
| mkdir -p "$HOME" | |
| curl -fsSL https://entire.io/install.sh | bash | |
| entire --version | |
| - name: Exercise upgrade plugin | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| ENTIRE_UPGRADE_GITHUB_TOKEN: ${{ github.token }} | |
| run: | | |
| set -o pipefail | |
| ./entire-upgrade --yes | tee stable.log | |
| grep -F "(curl install)" stable.log | |
| ./entire-upgrade --nightly --yes | tee nightly.log | |
| grep -F "(curl install)" nightly.log | |
| entire --version | |
| go: | |
| name: go install path | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: { go-version: "1.26" } | |
| - run: go build -o entire-upgrade ./cmd/entire-upgrade | |
| - name: Configure isolated GOBIN | |
| run: | | |
| echo "GOBIN=$RUNNER_TEMP/entire-go-bin" >> "$GITHUB_ENV" | |
| echo "$RUNNER_TEMP/entire-go-bin" >> "$GITHUB_PATH" | |
| - name: Install Entire via go install | |
| run: | | |
| mkdir -p "$GOBIN" | |
| go install github.com/entireio/cli/cmd/entire@v0.6.1 | |
| entire --version | |
| - name: Exercise upgrade plugin | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| # setup-go exports GOTOOLCHAIN=local; override it so `go install` | |
| # fetches whatever toolchain the latest cli's go.mod requires. | |
| GOTOOLCHAIN: auto | |
| run: | | |
| set -o pipefail | |
| ./entire-upgrade --yes | tee stable.log | |
| grep -F "(go install)" stable.log | |
| ./entire-upgrade --nightly --yes | tee nightly.log | |
| grep -F "(go install)" nightly.log | |
| entire --version | |
| test -x "$GOBIN/git-remote-entire" | |
| go-windows: | |
| name: go install path (Windows) | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: { go-version: "1.26" } | |
| - run: go build -o entire-upgrade.exe ./cmd/entire-upgrade | |
| - name: Configure isolated GOBIN | |
| shell: pwsh | |
| run: | | |
| $goBin = Join-Path $env:RUNNER_TEMP "entire-go-bin" | |
| "GOBIN=$goBin" >> $env:GITHUB_ENV | |
| $goBin >> $env:GITHUB_PATH | |
| - name: Install Entire via go install | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path $env:GOBIN | Out-Null | |
| go install github.com/entireio/cli/cmd/entire@v0.6.1 | |
| entire --version | |
| - name: Exercise upgrade plugin | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| # setup-go exports GOTOOLCHAIN=local; override it so `go install` | |
| # fetches whatever toolchain the latest cli's go.mod requires. | |
| GOTOOLCHAIN: auto | |
| shell: pwsh | |
| run: | | |
| .\entire-upgrade.exe --yes | Tee-Object -FilePath stable.log | |
| if ($LASTEXITCODE -ne 0) { throw "stable upgrade failed" } | |
| if (-not (Select-String -Path stable.log -SimpleMatch "(go install)" -Quiet)) { | |
| throw "stable upgrade did not detect a go install" | |
| } | |
| .\entire-upgrade.exe --nightly --yes | Tee-Object -FilePath nightly.log | |
| if ($LASTEXITCODE -ne 0) { throw "nightly upgrade failed" } | |
| if (-not (Select-String -Path nightly.log -SimpleMatch "(go install)" -Quiet)) { | |
| throw "nightly upgrade did not detect a go install" | |
| } | |
| entire --version | |
| if (-not (Test-Path (Join-Path $env:GOBIN "git-remote-entire.exe"))) { | |
| throw "git-remote-entire was not installed beside entire" | |
| } |