Skip to content

Update @github/copilot to 1.0.76-5 (#2140) #3073

Update @github/copilot to 1.0.76-5 (#2140)

Update @github/copilot to 1.0.76-5 (#2140) #3073

Workflow file for this run

name: "Go SDK Tests"
on:
push:
branches:
- main
workflow_dispatch:
workflow_call:
permissions:
contents: read
jobs:
test:
name: "Go SDK Tests (${{ matrix.os }}, ${{ matrix.transport }})"
if: github.event.repository.fork == false
env:
POWERSHELL_UPDATECHECK: Off
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
transport: ["default", "inprocess"]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
working-directory: ./go
steps:
- uses: actions/checkout@v6.0.2
- uses: ./.github/actions/setup-copilot
id: setup-copilot
- uses: actions/setup-go@v6
with:
go-version: "1.24"
- name: Run go fmt
if: runner.os == 'Linux'
working-directory: ./go
run: |
go fmt ./...
if [ -n "$(git status --porcelain)" ]; then
echo "❌ go fmt produced changes. Please run 'go fmt ./...' in go"
git --no-pager diff
exit 1
fi
echo "✅ go fmt produced no changes"
- name: Install golangci-lint
if: runner.os == 'Linux'
uses: golangci/golangci-lint-action@v9
with:
working-directory: ./go
version: latest
args: --timeout=5m
- name: Install test harness dependencies
working-directory: ./test/harness
run: npm ci --ignore-scripts
- name: Warm up PowerShell
if: runner.os == 'Windows'
run: pwsh.exe -Command "Write-Host 'PowerShell ready'"
- name: Select inprocess transport
if: matrix.transport == 'inprocess'
run: |
echo "COPILOT_SDK_DEFAULT_CONNECTION=inprocess" >> "$GITHUB_ENV"
echo "GOFLAGS=-tags=copilot_inprocess" >> "$GITHUB_ENV"
- name: Run Go SDK tests
env:
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.cli-path }}
run: /bin/bash test.sh