Skip to content

Commit

Permalink
Merge pull request #2318 from keep-network/ci-jobs-to-github-actions-…
Browse files Browse the repository at this point in the history
…migration

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 Go client.
  • Loading branch information
nkuba authored Feb 10, 2021
2 parents 1f7338f + 8b9bd59 commit 4bfa7a6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
root: /tmp/docs
paths:
- solidity/*
# GitHub Actions equivalent of this job (.github/workflows/client.yml) has been created as part of work on RFC-18
build_client_and_test_go:
executor: docker-git
steps:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Go

#TODO: extend the conditions once workflow gets tested together with other workflows
on:
push:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: satackey/[email protected]
continue-on-error: true # ignore the failure of a step and avoid terminating the job
- name: Run Docker build
run: |
docker build \
--target gobuild \
--tag go-build-env .
docker build \
--tag keep-client .
- name: Create test results directory
run: |
mkdir test-results
- name: Run Go tests
run: |
docker run \
--volume $GITHUB_WORKSPACE/test-results:/mnt/test-results \
--workdir /go/src/github.com/keep-network/keep-core \
go-build-env \
gotestsum --junitfile /mnt/test-results/unit-tests.xml
- name: Publish unit test results
uses: EnricoMi/[email protected]
if: always() # guarantees that this action always runs, even if earlier steps fail
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: ./test-results/unit-tests.xml
check_name: Go Test Results # name under which test results will be presented in GitHub (optional)
comment_on_pr: false # turns off commenting on Pull Requests

0 comments on commit 4bfa7a6

Please sign in to comment.