Skip to content

Merge pull request #99 from sun-yuliang/dev/add-custom-metric-cpu-usa… #335

Merge pull request #99 from sun-yuliang/dev/add-custom-metric-cpu-usa…

Merge pull request #99 from sun-yuliang/dev/add-custom-metric-cpu-usa… #335

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
types: [ opened, reopened, synchronize ]
jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: go.mod
cache: false
- name: Check Go modules
run: |
go mod tidy && git add go.* &&
git diff --cached --exit-code || (echo 'Please run "go mod tidy" to sync Go modules' && exit 1);
- name: Verify gofmt
run: |
make fmt && git add pkg &&
git diff --cached --exit-code || (echo 'Please run "make fmt" to verify gofmt' && exit 1);