Skip to content

Commit

Permalink
Create GH Actions workflow for build&test of Go client
Browse files Browse the repository at this point in the history
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
michalinacienciala committed Feb 8, 2021
1 parent 2db0fb5 commit 804446e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Go

#TODO: extend the conditions once workflow gets tested together with other workflows
on: [push, pull_request]

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: Create test results directory
run: |
mkdir -p /tmp/test-results/keep-core-go
- name: Run Docker build
run: |
docker build --target gobuild -t go-build-env .
docker build --tag keep-client .
- name: Run Go tests
run: |
docker run --volume /tmp/test-results/keep-core-go:/mnt/test-results --workdir /go/src/github.com/keep-network/keep-core go-build-env gotestsum --junitfile /mnt/test-results/unit-tests.xml
docker run --volume /tmp/test-results/keep-core-go:/mnt/test-results --workdir /go/src/github.com/keep-network/keep-core go-build-env cat /mnt/test-results/unit-tests.xml > ./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: unit-tests.xml
check_name: Go Test Results # name under which test results will be presented in GitHub (optional)

0 comments on commit 804446e

Please sign in to comment.