Skip to content

Refactor main.go rules declaration (#187) #15

Refactor main.go rules declaration (#187)

Refactor main.go rules declaration (#187) #15

Workflow file for this run

name: checks
on:
pull_request:
push:
branches:
- "main"
jobs:
check-golang:
runs-on: ubuntu-latest
name: Golang Linting
steps:
- uses: actions/checkout@v5
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v6
with:
go-version: "${{ env.golang-version }}"
check-latest: true
cache: true
- name: Tidy Go modules, format, generate docs, dashboards and check for changes
run: make generate
- name: Run GolangCI Lint
uses: golangci/golangci-lint-action@v8.0.0
with:
version: v2.4.0
args: --timeout 10m0s
check-dashboards:
runs-on: ubuntu-latest
name: Dashboards Linting
steps:
- uses: actions/checkout@v5
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- name: Build dashboards
run: make build-dashboards-local
- name: Install percli
uses: perses/cli-actions/actions/install_percli@v0.2.0
with:
cli-version: "latest"
- name: Validate Resources with Perses CLI
uses: perses/cli-actions/actions/validate_resources@main
with:
directory: './built/dashboards/perses'
format:
runs-on: ubuntu-latest
name: Documentation Formatting Check
steps:
- uses: actions/checkout@v5
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v6
with:
go-version: "${{ env.golang-version }}"
check-latest: true
cache: true
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "${{ env.golang-version }}"
check-latest: true
- name: Tidy Go modules
run: make tidy
- name: Check Documentation
run: make check-docs