Skip to content

Add basic RPC metrics via mc support top rpc #4813

Add basic RPC metrics via mc support top rpc

Add basic RPC metrics via mc support top rpc #4813

Workflow file for this run

name: Go
on:
pull_request:
branches:
- master
# This ensures that previous jobs for the PR are canceled when the PR is
# updated.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
name: Test on Go ${{ matrix.go-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
GO111MODULE: on
strategy:
matrix:
go-version: [1.22.x]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Build on ${{ matrix.os }}
if: matrix.os == 'windows-latest'
run: |
go build --ldflags="-s -w" -o %GOPATH%\bin\mc.exe
go test -v -race --timeout 30m ./...
- name: Build on ${{ matrix.os }}
if: matrix.os == 'macos-latest'
run: |
go build --ldflags="-s -w" -o %GOPATH%\bin\mc
go test -v -race --timeout 30m ./...
- name: Build on ${{ matrix.os }}
if: matrix.os == 'ubuntu-latest'
env:
ACCESS_KEY: minioadmin
SECRET_KEY: minioadmin
ENABLE_HTTPS: 1
MINIO_CI_CD: 1
SERVER_ENDPOINT: localhost:9000
MC_TEST_ENABLE_HTTPS: true
MC_TEST_SKIP_INSECURE: true
MC_TEST_SKIP_BUILD: true
run: |
wget https://dl.min.io/server/minio/release/linux-amd64/minio && chmod +x minio
mkdir -p ~/.minio/certs/ && cp testdata/localhost.crt ~/.minio/certs/public.crt && cp testdata/localhost.key ~/.minio/certs/private.key
sudo cp testdata/localhost.crt /usr/local/share/ca-certificates/ && sudo update-ca-certificates
./minio server /tmp/test-xl/{1...4}/ & sleep 10
make
make test-race
make verify
./functional-tests.sh
vetchecks: # Run vet checks against one version.
env:
CGO_ENABLED: 0
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.22.x
- name: Checkout code
uses: actions/checkout@v2
- name: Test 386
run: GOOS=linux GOARCH=386 go test -short ./...
- name: Staticcheck
# Run with defaults, but allow errors with other formats ST1005
run: go install honnef.co/go/tools/cmd/staticcheck@latest && make lint