Skip to content

upgrade debian version in Dockerfiles (#2441) #2

upgrade debian version in Dockerfiles (#2441)

upgrade debian version in Dockerfiles (#2441) #2

Workflow file for this run

name: go
on:
push:
branches:
- main
- release/*
- snapshot/*
tags:
- v*
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.ref_name != 'main' }}
jobs:
checklicense:
name: "check license headers"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: check license headers
run: make checklicense
docs-fmt:
name: "check doc format"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: perses/github-actions@v0.6.0
- uses: ./.github/perses-ci/actions/setup_environment
with:
enable_go: true
- name: install mdox
run: go install github.com/bwplotka/mdox@latest
- name: check docs
run: make checkdocs
gofmt:
name: "check code format"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: perses/github-actions@v0.6.0
- uses: ./.github/perses-ci/actions/setup_environment
with:
enable_go: true
enable_cue: true
cue_version: "v0.11.0"
- name: check format
run: make checkformat
- name: check go.mod
run: make checkunused
test:
name: "tests with file DB"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: perses/github-actions@v0.6.0
- uses: ./.github/perses-ci/actions/setup_environment
with:
enable_go: true
enable_cue: true # needed for DaC CLI commands unit tests
cue_version: "v0.11.0"
- name: test
run: make integration-test
test-mysql:
name: "tests with mysql"
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb
ports:
- '3306:3306'
env:
MARIADB_ROOT_PASSWORD: root
MARIADB_DATABASE: perses
MARIADB_USER: user
MARIADB_PASSWORD: password
steps:
- name: checkout
uses: actions/checkout@v4
- uses: perses/github-actions@v0.6.0
- uses: ./.github/perses-ci/actions/setup_environment
with:
enable_go: true
enable_cue: true # needed for DaC CLI commands unit tests
cue_version: "v0.11.0"
- name: test
run: make mysql-integration-test
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: perses/github-actions@v0.6.0
- uses: ./.github/perses-ci/actions/setup_environment
with:
enable_go: true
enable_go_cache: false
enable_npm: false
- name: generate files
run: make assets-compress
- name: golangci-lint
uses: golangci/golangci-lint-action@v6.1.1
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.56.2
args: --timeout 5m
cue-eval:
name: cue
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: perses/github-actions@v0.6.0
- uses: ./.github/perses-ci/actions/setup_environment
with:
enable_go: true
enable_cue: true
cue_version: "v0.11.0"
- name: eval cue schema
run: make cue-eval
- name: test cue schema
run: make cue-test
check-cue-gen:
name: "check cue gen files"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: perses/github-actions@v0.6.0
- uses: ./.github/perses-ci/actions/setup_environment
with:
enable_go: true
enable_cue: true
cue_version: "v0.11.0"
- name: generate cue files
run: make cue-gen
- name: check for changes
run: git diff --exit-code || { echo "CUE generated files are not up to date. Please run 'make cue-gen' and commit the changes."; exit 1; }