Skip to content

Commit

Permalink
Enable Github Action CI (apache#170)
Browse files Browse the repository at this point in the history
Signed-off-by: xiaolong.ran <rxl@apache.org>

Master Issue: apache#169 

### Modifications

- Replace Apache Jenkins with Github Action CI
  • Loading branch information
wolfstudy authored and sijie committed Jan 13, 2020
1 parent ba9ec93 commit 9b739cf
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 16 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
name: Go
on: [push]
on: [pull_request]
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
- name: Set up Go 1.12
uses: actions/setup-go@v1
with:
go-version: 1.13
go-version: 1.12
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Get dependencies
- name: Test
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v .
./docker-ci.sh
29 changes: 29 additions & 0 deletions .github/workflows/project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Project Style Check
on: [pull_request]
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.12
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: InstallTool
run: |
wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.18.0
./bin/golangci-lint --version
- name: Build
run: go build ./pulsar

- name: CheckStyle
run: |
./bin/golangci-lint run -c ./.golangci.yml ./...
3 changes: 0 additions & 3 deletions docker-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@

set -e -x

# Project code style check
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.21.0 golangci-lint run -v -c ./.golangci.yml ./...

SRC_DIR=$(git rev-parse --show-toplevel)
cd ${SRC_DIR}

Expand Down
2 changes: 1 addition & 1 deletion pulsar/consumer_partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ func (pc *partitionConsumer) dispatcher() {
case clearQueueCb := <-pc.clearQueueCh:
// drain the message queue on any new connection by sending a
// special nil message to the channel so we know when to stop dropping messages
var nextMessageInQueue *messageID = nil
var nextMessageInQueue *messageID
go func() {
pc.queueCh <- nil
}()
Expand Down

0 comments on commit 9b739cf

Please sign in to comment.