Skip to content

feat(pyroscope): add Grafana Pyroscope component #290

feat(pyroscope): add Grafana Pyroscope component

feat(pyroscope): add Grafana Pyroscope component #290

Workflow file for this run

name: Lint & Test
on:
push:
branches: [ master, v2 ]
pull_request:
branches: [ master, v2 ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Create cache directories
run: |
mkdir -p ~/.cache/golangci-lint
mkdir -p ~/.cache/go-build
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Go Lint Cache
uses: actions/cache@v4
with:
path: ~/.cache/golangci-lint/
key: go-lint-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
go-lint-cache-${{ runner.os }}-
- name: Go Mod Cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
key: go-mod-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
go-mod-cache-${{ runner.os }}-
- name: Check go mod
run: |
go mod tidy
git diff --exit-code go.mod
git diff --exit-code go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
args: --timeout=10m --verbose
skip-cache: false
env:
GOLANGCI_LINT_CACHE: go-lint-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Go Mod Cache
uses: actions/cache@v4
with:
path: ~/.cache/go-build
key: go-test-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
go-test-cache-${{ runner.os }}-
- name: Run tests
run: go test ./... -race -count=1 -timeout=15m
- name: Run vet
run: go vet ./...