Skip to content

Commit 2863364

Browse files
authored
Merge pull request #67 from keep-network/rfc-18/ci-jobs-to-github-actions-migration-go
Create GH Actions workflow for build&test of Go client As described in RFC-18, there is a need for a refactorization of Keep and tBTC release processes in order to reduce human involvment and make the processes faster and less error prone. A part of this task is migration from CircleCI jobs to GitHub Actions. This commit creates a GitHub Action workfow for building and testing of Go client. At this point, solution utilizes EnricoMi/publish-unit-test-result-action@v1 action for publishing of the test results, but this may be replaced in the future by use of other action or use of problem matchers.
2 parents 8b14411 + 3cca7d1 commit 2863364

2 files changed

Lines changed: 44 additions & 31 deletions

File tree

.circleci/config.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/client.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Go
2+
3+
#TODO: extend the conditions once workflow gets tested together with other workflows
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
build-and-test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Setup Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: "1.13.x"
21+
22+
- name: Run Go generators
23+
run: go generate ./.../gen
24+
25+
- name: Build Go
26+
run: go build ./...
27+
28+
- name: Create test results directory
29+
run: mkdir test-results
30+
31+
- name: Install gotestsum
32+
run: go get gotest.tools/gotestsum
33+
34+
- name: Run Go tests
35+
run: gotestsum --junitfile test-results/unit-tests.xml
36+
37+
- name: Publish unit test results
38+
uses: EnricoMi/publish-unit-test-result-action@v1
39+
if: always()
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
files: ./test-results/unit-tests.xml
43+
check_name: Go Test Results # name under which test results will be presented in GitHub (optional)
44+
comment_on_pr: false # turns off commenting on Pull Requests

0 commit comments

Comments
 (0)