Skip to content

Merge pull request #27 from gopherguides/workflow-fix #268

Merge pull request #27 from gopherguides/workflow-fix

Merge pull request #27 from gopherguides/workflow-fix #268

Workflow file for this run

name: Go Test and Lint
on: [push]
jobs:
tests-on:
name: ${{matrix.go-version}} ${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.23.x]
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23.x"
- name: Go Environment
run: go env
- name: Verify Go Modules
run: go mod verify
- name: Build
run: go build -v ./cmd/hype/
- name: Run tests with Race Detector
run: |
go_dirs=$(go list ./... | grep -v '/docs')
go test -race -vet=off $go_dirs
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Run staticcheck
run: |
go_dirs=$(go list ./... | grep -v '/docs')
staticcheck $go_dirs