Skip to content

Merge pull request #1907 from gofiber/dependabot/go_modules/couchbase… #2709

Merge pull request #1907 from gofiber/dependabot/go_modules/couchbase…

Merge pull request #1907 from gofiber/dependabot/go_modules/couchbase… #2709

Workflow file for this run

name: Golangci-Lint Check
on:
push:
branches:
- "master"
- "main"
paths-ignore:
- "**.md"
- LICENSE
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"
pull_request:
branches:
- "*"
paths-ignore:
- "**.md"
- LICENSE
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"
jobs:
changes:
runs-on: ubuntu-latest
steps:
- name: Fetch Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate filters
id: filter-setup
run: |
filters=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . ! -path ./testhelpers -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}')
# Add all testhelpers subdirectories to filters
testhelpers_filters=$(find ./testhelpers -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | awk '{printf "testhelpers/%s: \"testhelpers/%s/**\"\n", $1, $1}')
echo "filters<<EOF" >> $GITHUB_OUTPUT
echo "$filters" >> $GITHUB_OUTPUT
echo "$testhelpers_filters" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
shell: bash
- name: Filter changes
id: filter
uses: dorny/paths-filter@v3
with:
filters: ${{ steps.filter-setup.outputs.filters }}
outputs:
packages: ${{ steps.filter.outputs.changes || '[]' }}
lint:
needs: changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJSON(needs.changes.outputs.packages || '[]') }}
steps:
- name: Fetch Repository
uses: actions/checkout@v4
- name: Run golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
golangci_lint_flags: "--tests=false --timeout=5m"
workdir: ${{ matrix.package }}
fail_level: "warning"
filter_mode: nofilter