name: "10 - Test: Linting"
on:
  push:
    tags:
      - v*
    branches:
      - main
      - "v*"
  workflow_dispatch:
  pull_request:

jobs:
  golangci:
    name: Test Linting
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
        with:
          path: steampipe

      - name: Checkout Pipe Fittings Components repository
        uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
        with:
          repository: turbot/pipe-fittings
          path: pipe-fittings
          ref: v1.6.x

      - name: Set up Go
        uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
        with:
          go-version: 1.24

      - name: golangci-lint
        uses: golangci/golangci-lint-action@0a35821d5c230e903fcfe077583637dea1b27b47 # v9.0.0
        continue-on-error: true # we dont want to enforce just yet
        with:
          version: v1.52.2
          args: --timeout=15m --config=.golangci.yml
          skip-pkg-cache: true
          skip-build-cache: true