Skip to content

Commit

Permalink
Merge pull request #301 from weibocom/dev
Browse files Browse the repository at this point in the history
preview
  • Loading branch information
rayzhang0603 authored Feb 21, 2024
2 parents a2b6f83 + c671e0d commit db996c8
Show file tree
Hide file tree
Showing 100 changed files with 9,707 additions and 1,470 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,58 @@ on:
- dev

name: build

env:
GOPATH: /home/runner/go
GO111MODULE: on

jobs:
testing:
strategy:
matrix:
go-version: [1.12.x,1.13.x,1.14.x,1.15.x,1.16.x,1.17.x]
go-version: [1.12.x,1.13.x,1.14.x,1.15.x,1.16.x,1.17.x,1.18.x,1.19.x,1.20.x,1.21.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Go
if: success()
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Install Go Dependencies
run: |
go get -d -v -t $(go list ./... | grep -v main)
- name: Run tests
run: go test -v -race $(go list ./... | grep -v main)
run: |
echo "GOPATH >>> $GOPATH"
echo "pwd >>> $PWD"
mkdir -p $GOPATH/src/github.com/weibocom/
cp -R ../motan-go $GOPATH/src/github.com/weibocom/
cd $GOPATH/src/github.com/weibocom/motan-go
go mod tidy
go test -v -race $(go list ./... | grep -v main)
codecov:
name: codecov
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.15
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.15.x
id: go

- name: Checkout code
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -d -v -t $(go list ./... | grep -v main)
uses: actions/checkout@v3

- name: Generate coverage report
run: |
echo "GOPATH >>> $GOPATH"
echo "pwd >>> $PWD"
mkdir -p $GOPATH/src/github.com/weibocom/
cp -R ../motan-go $GOPATH/src/github.com/weibocom/
cd $GOPATH/src/github.com/weibocom/motan-go
go mod tidy
go test -v -race -coverprofile=coverage.txt -covermode=atomic $(go list ./... | grep -v main)
- name: Upload coverage report
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ tmtags
pretty/zj
zj*

# Windows
*.exe

.idea/*
# gdb
*.gdb_history
Expand All @@ -37,3 +40,4 @@ main/magent*
log/log.test*
go.sum
agent_runtime
test/
Loading

0 comments on commit db996c8

Please sign in to comment.