# Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
#
# This Source Code Form is subject to the terms of the MIT License.
# If a copy of the MIT was not distributed with this file,
# You can obtain one at https://github.com/gogf/gf.

name: GolangCI Lint
on:
  push:
    branches:
      - master
      - develop
      - personal/**
      - feature/**
      - enhance/**
      - fix/**
      - feat/**
  pull_request:
    branches:
      - master
      - develop
      - personal/**
      - feature/**
      - enhance/**
      - fix/**
      - feat/**

jobs:
  golang-ci:
    strategy:
      matrix:
        go-version: [ 'stable' ]

    name: golang-ci-lint
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup Golang ${{ matrix.go-version }}
        uses: actions/setup-go@v5
        with:
          go-version: ${{ matrix.go-version }}
      - name: golang-ci-lint
        uses: golangci/golangci-lint-action@v6
        with:
          # Required: specify the golangci-lint version without the patch version to always use the latest patch.
          version: v1.64.5
          only-new-issues: true
          skip-cache: true
          github-token: ${{ secrets.GITHUB_TOKEN }}
          args: --timeout 3m0s --config=.golangci.yml -v
