Skip to content

Commit

Permalink
Use github actions for test (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ariesdevil authored Nov 28, 2019
1 parent a152ac5 commit a3474bd
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 27 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on: [push, pull_request]
name: GoBeansProxy Test
jobs:
test:
strategy:
matrix:
go-version: [1.12.x, 1.13.x]
python-version: [2.x]
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}

- name: Install Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

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

- name: Get test tools
run: go get -u -v golang.org/x/tools/cmd/goimports

- name: Prepare Test
run: pip install --user -r tests/pip-req.txt

- name: Test
run: |
export PATH=${PATH}:`go env GOPATH`/bin
diff <(goimports -d .) <(printf "")
go mod vendor
go get -u -v github.com/douban/gobeansdb
make test
- name: Install
run: make install
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ pytest:install
./tests/run_test.sh

install:
GO111MODULE=on go mod vendor
go install ./
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GoBeansproxy [![Build Status](https://travis-ci.org/douban/gobeansproxy.svg?branch=master)](https://travis-ci.org/douban/gobeansproxy)
# GoBeansProxy ![](https://github.com/douban/gobeansproxy/workflows/GoBeansProxy%20Test/badge.svg)

A proxy for [Gobeansdb](https://github.com/douban/gobeansdb).

Expand All @@ -11,6 +11,7 @@ Supported Go version: > 1.11.0
```
$ git clone http://github.com/douban/gobeansproxy.git
$ cd gobeansproxy
$ go mod vendor
$ make
```

Expand Down

0 comments on commit a3474bd

Please sign in to comment.