Skip to content

Improve error reporting and export missing request types in alert sch… #311

Improve error reporting and export missing request types in alert sch…

Improve error reporting and export missing request types in alert sch… #311

Workflow file for this run

name: "[Go SDK] Code Check"
env:
PROTOC_VERSION: "26.1"
on:
workflow_dispatch:
pull_request:
branches: [ master ]
paths:
- 'go/**'
- 'proto/**'
- '.github/workflows/**'
jobs:
format_test_linux:
name: "[Go SDK - Linux] Format, Lint, Test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: arduino/setup-protoc@v3
with:
version: ${{env.PROTOC_VERSION}}
- name: Check formatting and build
run: |
go mod tidy
go install google.golang.org/protobuf/cmd/protoc-gen-go
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
gofmt -l .
make build
- uses: golangci/golangci-lint-action@v2
with:
# Optional: golangci-lint command line arguments.
#args: --out-format=colored-line-number
working-directory: go
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
# Optional: if set to true then the action will use pre-installed Go.
skip-go-installation: true
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true
# - name: test
# run: make test
run_examples:
name: "[Go SDK - Linux] Run Examples"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: arduino/setup-protoc@v3
with:
version: ${{env.PROTOC_VERSION}}
- name: Run Examples
env:
AWS_TEST_ROLE: ${{ secrets.AWS_TEST_ROLE }}
CORALOGIX_TEAM_API_KEY: ${{ secrets.CORALOGIX_TEAM_API_KEY }}
CORALOGIX_USER_API_KEY: ${{ secrets.CORALOGIX_USER_API_KEY }}
CORALOGIX_REGION: ${{ secrets.CORALOGIX_REGION }}
TEAM_ID: ${{ secrets.TEAM_ID }}
AWS_REGION: ${{ secrets.AWS_REGION }}
METRICS_BUCKET: ${{ secrets.METRICS_BUCKET }}
LOGS_BUCKET: ${{ secrets.LOGS_BUCKET }}
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
make test
# FLT_windows:
# name: "[Go SDK - Windows] Format, Lint, Test"
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-go@v5
# - uses: arduino/setup-protoc@v3
# with:
# version: ${{env.PROTOC_VERSION}}
# - name: Check formatting and build
# run: |
# go mod tidy
# go install google.golang.org/protobuf/cmd/protoc-gen-go
# go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
# gofmt -l .
# make build
# - uses: golangci/golangci-lint-action@v2
# with:
# # Optional: golangci-lint command line arguments.
# #args: --out-format=colored-line-number
# working-directory: go
# # Optional: show only new issues if it's a pull request. The default value is `false`.
# # only-new-issues: true
# # Optional: if set to true then the action will use pre-installed Go.
# skip-go-installation: true
# # Optional: if set to true then the action don't cache or restore ~/go/pkg.
# # skip-pkg-cache: true
# # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# # skip-build-cache: true
# # - name: test
# # run: make test
# - name: Run Examples
# env:
# AWS_TEST_ROLE: ${{ secrets.AWS_TEST_ROLE }}
# CORALOGIX_TEAM_API_KEY: ${{ secrets.CORALOGIX_TEAM_API_KEY }}
# CORALOGIX_USER_API_KEY: ${{ secrets.CORALOGIX_USER_API_KEY }}
# CORALOGIX_REGION: ${{ secrets.CORALOGIX_REGION }}
# TEAM_ID: ${{ secrets.TEAM_ID }}
# run: make test