windows workflow (connectrpc/connect-go)
The windows workflow from connectrpc/connect-go, explained and optimized by Latchkey.
C
CI health: C - fair
Run this on Latchkey for self-healing, caching, and up to 58% lower cost.
Grade your own workflow free or run it on Latchkey →What it does
This is the windows workflow from the connectrpc/connect-go repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
workflow (.yml)
name: windows
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
schedule:
- cron: '15 22 * * *'
workflow_dispatch: {} # support manual runs
permissions:
contents: read
jobs:
ci:
name: windows (go:${{ matrix.go-version.name }})
runs-on: windows-latest
strategy:
matrix:
go-version:
- name: latest
version: 1.26.x
- name: previous
version: 1.25.x
steps:
- name: Checkout Code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version.version }}
- name: Test
shell: bash
run: |
go build ./...
go test -vet=off -race ./...
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: windows on: push: branches: [main] tags: ['v*'] pull_request: branches: [main] schedule: - cron: '15 22 * * *' workflow_dispatch: {} # support manual runs permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: ci: timeout-minutes: 30 name: windows (go:${{ matrix.go-version.name }}) runs-on: windows-latest strategy: matrix: go-version: - name: latest version: 1.26.x - name: previous version: 1.25.x steps: - name: Checkout Code uses: actions/checkout@v7 with: fetch-depth: 1 - name: Install Go uses: actions/setup-go@v6 with: go-version: ${{ matrix.go-version.version }} - name: Test shell: bash run: | go build ./... go test -vet=off -race ./...
What changed
- Cancel superseded runs when a branch or PR gets a newer push.
- Add a job timeout so a hung step cannot burn hours of runner time.
This workflow runs 1 job (2 with the matrix expanded) per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.