From 20ecef6a8a129f69ed94b3dab07e81dce31a7432 Mon Sep 17 00:00:00 2001 From: Mehrdad Arshad Rad Date: Tue, 26 Jan 2021 16:41:49 -0800 Subject: [PATCH] add github action --- .github/workflows/tcpdog.yml | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/tcpdog.yml diff --git a/.github/workflows/tcpdog.yml b/.github/workflows/tcpdog.yml new file mode 100644 index 0000000..e729924 --- /dev/null +++ b/.github/workflows/tcpdog.yml @@ -0,0 +1,46 @@ +name: "build" + +on: + push: + branches: + - main + paths-ignore: + - "docs/**" + - "**.md" + pull_request: + branches: + - main + paths-ignore: + - "docs/**" + - "**.md" + +jobs: + tcpdog: + name: Test and build + runs-on: ubuntu-18.04 + steps: + - name: Set up Golang + uses: actions/setup-go@v2 + with: + go-version: ^1.15 + + - name: Check out code + uses: actions/checkout@v2 + + - name: Build client + run: | + cd tcpdog + go build + + - name: Build server + run: | + cd server + go build + + - name: Test + run: go test . -timeout 5m -coverprofile=profile.cov + + - name: Coveralls + uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: profile.cov