Skip to content

fix(test): update ocp-context-injection test for oc_login tool addition #11

fix(test): update ocp-context-injection test for oc_login tool addition

fix(test): update ocp-context-injection test for oc_login tool addition #11

Workflow file for this run

name: Go CI
on:
pull_request:
branches: [main]
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- 'Makefile'
- '.github/workflows/go-ci.yml'
push:
branches: [main]
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
permissions:
contents: read
jobs:
vet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Vet
run: go vet ./...
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Test
run: go test ./... -count=1 -timeout 120s
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
exclude:
- goos: windows
goarch: arm64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
EXT=""
if [ "$GOOS" = "windows" ]; then EXT=".exe"; fi
go build -ldflags "-s -w -X main.version=ci -X main.commit=${{ github.sha }}" \
-o dist/tinycode-${GOOS}-${GOARCH}${EXT} ./cmd/tinycode/