Skip to content

update action

update action #149

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches:
- 'main'
tags:
- '*'
pull_request:
branches:
- 'main'
workflow_dispatch:
concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
env:

Check failure on line 25 in .github/workflows/go.yml

View workflow run for this annotation

GitHub Actions / Go

Invalid workflow file

The workflow is not valid. .github/workflows/go.yml (Line: 25, Col: 7): Unexpected value 'env'
CGO_ENABLED: 0
matrix:
os:
- 'ubuntu-latest'
- 'macos-latest'
runs-on: '${{ matrix.os }}'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Check and get dependencies
run: |
go mod tidy
git diff --exit-code go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59.1
# The installation mode `goinstall` always uses `CGO_ENABLED=1`.
install-mode: goinstall
args: --timeout=3m --config .golangci.yaml
- name: Test
run: 'make test'