Skip to content

Fix module path from metrics to metric #24

Fix module path from metrics to metric

Fix module path from metrics to metric #24

Workflow file for this run

name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.24']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: |
go mod download
make install-tools
- name: Format check
run: |
gofmt -s -l .
test -z "$(gofmt -s -l .)"
- name: Lint
run: make lint
- name: Run tests
run: make test-coverage
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: ./coverage.out
fail_ci_if_error: true
- name: Run benchmarks
run: make bench
security:
name: Security Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: ./...
- name: Run Nancy vulnerability scanner
run: |
go install github.com/sonatype-nexus-community/nancy@latest
go list -json -m all | nancy sleuth
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ['1.24']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: make build
- name: Verify module
run: make verify