Skip to content

test: add cmd tests #2061

test: add cmd tests

test: add cmd tests #2061

Workflow file for this run

# lint runs all linters in this repository
# This workflow is triggered by ci_release.yml workflow
name: lint
on:
workflow_call:
pull_request:
branches:
- main
- 'v*'
push:
branches:
- main
- 'v*'
jobs:
golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
# This steps sets the GIT_DIFF environment variable to true
# if files defined in PATTERS changed
- uses: technote-space/get-diff-action@v6.1.2
with:
# This job will pass without running if go.mod, go.sum, and *.go
# wasn't modified.
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@v7.0.0
with:
version: latest
args: --timeout 10m
github-token: ${{ secrets.github_token }}
if: env.GIT_DIFF
# hadolint lints the Dockerfile
hadolint:
uses: rollkit/.github/.github/workflows/reusable_dockerfile_lint.yml@v0.5.0 # yamllint disable-line rule:line-length
with:
dockerfile: Dockerfile
failure-threshold: error
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rollkit/.github/.github/actions/yamllint@v0.5.0
markdown-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rollkit/.github/.github/actions/markdown-lint@v0.5.0
# Checks that the .goreleaser.yaml file is valid
goreleaser-check:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: check