Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI Pipeline #2

Merged
merged 5 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: zk
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-20.04
services:
zookeeper:
image: zookeeper:3.9.2
ports:
- 2181:2181
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.21.9"
- name: Lint
run: make lint
- name: Test
run: make test
- name: Convert coverage.out to coverage.lcov
uses: jandelgado/[email protected]
- name: Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
/apache-zookeeper-*/
/apache-zookeeper-*.tar.gz
/.idea
/coverage.cov
/coverage.out
/bin
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.PHONY: test build coverage
.PHONY: test lint build coverage

test:
go test -race -p 1 -count=1 -tags=integration -covermode=atomic -coverprofile=coverage.cov ./...
go test -race -p 1 -count=1 -tags=integration -covermode=atomic -coverprofile=coverage.out ./...

lint:
echo "Do nothing"

build:
go build -o bin/lock test-examples/lock/main.go
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
Native Go Zookeeper Client Library
===================================
# Native Go Zookeeper Client Library

[![GoDoc](https://godoc.org/github.com/go-zookeeper/zk?status.svg)](https://godoc.org/github.com/go-zookeeper/zk)
[![Build Status](https://img.shields.io/github/workflow/status/go-zookeeper/zk/unittest/master)](https://github.com/go-zookeeper/zk/actions?query=branch%3Amaster)
[![Coverage Status](https://img.shields.io/codecov/c/github/go-zookeeper/zk/master)](https://codecov.io/gh/go-zookeeper/zk/branch/master)
[![zk](https://github.com/QuangTung97/zk/actions/workflows/go.yml/badge.svg)](https://github.com/QuangTung97/zk/actions/workflows/go.yml)
[![Coverage Status](https://coveralls.io/repos/github/QuangTung97/zk/badge.svg?branch=master)](https://coveralls.io/github/QuangTung97/zk?branch=master)

License
-------
## License

3-clause BSD. See LICENSE file.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/QuangTung97/zk

go 1.19
go 1.21.2

require github.com/stretchr/testify v1.9.0

Expand Down
1 change: 1 addition & 0 deletions todolist
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*) Add CI Pipeline for Integration Tests
*) Add Lint
*) Batching Read & Write to TCP (Need to do or not?)
*) Stress Tests with Race Detector
*) Add Multi-Ops Transactions
Loading