这是indexloc提供的服务,不要输入任何密码
Skip to content

feat: enhance SecureConnection Close method for safety and idempotency #152

feat: enhance SecureConnection Close method for safety and idempotency

feat: enhance SecureConnection Close method for safety and idempotency #152

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
push:
branches: "*"
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "stable"
check-latest: true
- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download dependencies
run: go mod download
- name: Install protobuf compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Install protoc-gen-go and protoc-gen-go-vtproto
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto@latest
- name: Generate protobuf files
run: make build-protoc
- name: Run tests
run: go test -v -race -coverprofile=coverage.out ./...
build:
name: Build
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "stable"
check-latest: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download dependencies
run: go mod download
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler binaryen
- name: Install protoc-gen-go and protoc-gen-go-vtproto
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto@latest
- name: Build all components
run: make build
- name: Build Docker image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
context: .
push: false
tags: portal:latest
# lint:
# name: Lint
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v5
#
# - name: Set up Go
# uses: actions/setup-go@v6
# with:
# go-version: "stable"
# check-latest: true
#
# - name: golangci-lint
# uses: golangci/golangci-lint-action@v8
# with:
# version: v2.6.0