未验证 提交 7fecfc85 编写于 作者: Z zhang-wei 提交者: GitHub

Use github action (#45)

* use github action

* fix make file

* fix lint

* update README.md
Co-authored-by: wu-sheng's avatar吴晟 Wu Sheng <wu.sheng@foxmail.com>
上级 aa9175b8
version: 2.1
workflows:
version: 2
api_verify:
jobs:
- verify
executors:
build:
docker:
- image: circleci/golang:1.12
working_directory: /go/src/github.com/SkyAPM/go2sky
jobs:
verify:
executor: build
steps:
- checkout
- run: make test
- run: make lint
# Licensed to SkyAPM org under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. SkyAPM org licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Build
on:
pull_request:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: make deps
- name: Lint
run: make lint
- name: Test
run: make test
......@@ -21,6 +21,9 @@ GRPC_PATH := $(GO2SKY_GO)/reporter/grpc
.DEFAULT_GOAL := test
.PHONY: deps
deps:
go get -v -t -d ./...
.PHONY: test
test:
......
# GO2Sky
[![CircleCI](https://circleci.com/gh/SkyAPM/go2sky.svg?style=svg)](https://circleci.com/gh/SkyAPM/go2sky)
[![Build](https://github.com/SkyAPM/go2sky/workflows/Build/badge.svg?branch=master)](https://github.com/SkyAPM/go2sky/actions?query=branch%3Amaster+event%3Apush+workflow%3ABuild)
[![GoDoc](https://godoc.org/github.com/SkyAPM/go2sky?status.svg)](https://godoc.org/github.com/SkyAPM/go2sky)
......
......@@ -42,4 +42,4 @@ linters-settings:
goconst:
min-occurrences: 4
govet:
check-shadowing: true
check-shadowing: true
\ No newline at end of file
......@@ -202,7 +202,7 @@ func (t *Tracer) CreateExitSpan(ctx context.Context, operationName string, peer
firstSpanOperationName := firstSpan.GetOperationName()
ref, ok := ctx.Value(refKeyInstance).(*propagation.SpanContext)
var entryEndpoint = ""
var entryServiceInstanceID int32 = 0
var entryServiceInstanceID int32
if ok && ref != nil {
spanContext.Sample = ref.Sample
entryEndpoint = ref.EntryEndpoint
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册