mirror of
https://github.com/coreos/prometheus-operator.git
synced 2026-02-05 06:45:27 +01:00
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 9.0.0 to 9.1.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v9.0.0...v9.1.0) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-version: 9.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
116 lines
3.2 KiB
YAML
116 lines
3.2 KiB
YAML
name: checks
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- 'release-*'
|
|
- 'master'
|
|
- 'main'
|
|
tags:
|
|
- 'v*'
|
|
# To cancel running workflow when new commits pushed in a pull request
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
generate:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- macos-latest
|
|
- ubuntu-latest
|
|
name: Generate and format
|
|
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
|
|
- run: make --always-make format generate && git diff --exit-code
|
|
env:
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
check-docs:
|
|
runs-on: ubuntu-latest
|
|
name: Check Documentation formatting and links
|
|
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
|
|
- run: make check-docs
|
|
env:
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
check-golang:
|
|
runs-on: ubuntu-latest
|
|
name: Golang linter
|
|
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
|
|
- name: Check go.mod
|
|
run: make tidy && git diff --exit-code
|
|
- name: Run golangci-lint
|
|
uses: golangci/golangci-lint-action@v9.1.0
|
|
with:
|
|
version: '${{ env.golangci-lint-version }}'
|
|
args: --timeout 10m0s
|
|
install-mode: goinstall
|
|
- name: Lint API
|
|
run: make check-api
|
|
|
|
check-metrics:
|
|
runs-on: ubuntu-latest
|
|
name: Check prometheus metrics
|
|
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
|
|
- run: make check-metrics
|
|
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- macos-latest
|
|
- ubuntu-latest
|
|
name: Build operator binary
|
|
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
|
|
- run: make operator
|
|
|
|
po-rule-migration:
|
|
runs-on: ubuntu-latest
|
|
name: Build Prometheus Operator rule config map to rule file CRDs CLI tool
|
|
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
|
|
- run: cd cmd/po-rule-migration && go install
|