Merge pull request #357 from aergoio/topic/blacklist #521
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Complete Test | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
push: | |
branches: | |
- master | |
- develop | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.19' | |
- name: Install dependencies | |
run: | | |
sudo apt-get install -y jq m4 make cmake | |
- name: Build | |
run: make | |
# run unit test with code coverage report if action is triggered by push of master branch | |
# since Code Climate only evaluate code coverages of default branch. | |
- name: Unit Tests with publishing code coverage | |
if: github.event_name == 'push' && github.ref_name == 'master' && github.ref_type == 'branch' | |
uses: paambaati/codeclimate-action@v4 | |
env: | |
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} | |
with: | |
coverageCommand: go test -timeout 999s -coverprofile build/c.out ./... | |
prefix: github.com/aergoio/aergo/v2 | |
coverageLocations: ${{github.workspace}}/build/c.out:gocov | |
debug: true | |
# run unit test only in other cases | |
- name: Unit Tests | |
if: github.event_name != 'push' || github.ref_name != 'master' || github.ref_type != 'branch' | |
run: go test -timeout 999s ./... | |
- name: Integration Tests - brick | |
run: cd tests && ./run_tests.sh brick | |
- name: Integration Tests - sbp | |
run: cd tests && ./run_tests.sh sbp | |
- name: Integration Tests - dpos | |
run: cd tests && ./run_tests.sh dpos | |
- name: Integration Tests - raft | |
run: cd tests && ./run_tests.sh raft |