File tree Expand file tree Collapse file tree 3 files changed +30
-13
lines changed Expand file tree Collapse file tree 3 files changed +30
-13
lines changed Original file line number Diff line number Diff line change 1616 - uses : actions/checkout@v3
1717 - uses : actions/setup-go@v3
1818 with :
19- go-version : " 1.19"
19+ go-version : ' ~1.19.12'
20+ check-latest : true
2021 - name : golangci-lint
2122 uses : golangci/golangci-lint-action@v3
2223 with :
@@ -25,23 +26,22 @@ jobs:
2526 args : --timeout 10m
2627
2728 unit_test :
28- name : Golang Unit Tests v${{ matrix.go }} (${{ matrix.os }})
29- runs-on : ${{ matrix.os }}
30- strategy :
31- matrix :
32- go : ["1.19"]
33- os : [ubuntu-20.04]
29+ name : Golang Unit Tests
30+ runs-on : ubuntu-20.04
3431 steps :
3532 - uses : actions/checkout@v3
3633 - uses : actions/setup-go@v3
3734 with :
38- go-version : ${{ matrix.go }}
35+ go-version : ' ~1.19.12'
36+ check-latest : true
3937 - run : go mod download
4038 shell : bash
4139 - run : ./scripts/build.sh ./build/precompile-evm
4240 shell : bash
4341 - run : ./scripts/build_test.sh -race
4442 shell : bash
43+ - run : ./scripts/coverage.sh
44+ shell : bash
4545
4646 e2e_test :
4747 name : e2e tests
5454 - name : Set up Go
5555 uses : actions/setup-go@v3
5656 with :
57- go-version : 1.19
57+ go-version : ' ~1.19.12'
58+ check-latest : true
5859 - name : Use Node.js
5960 uses : actions/setup-node@v3
6061 with :
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ set -o errexit
44set -o nounset
55set -o pipefail
66
7- go_version_minimum=" 1.19.6 "
7+ go_version_minimum=" 1.19.12 "
88
99go_version () {
1010 go version | sed -nE -e ' s/[^0-9.]+([0-9.]+).+/\1/p'
@@ -23,7 +23,7 @@ version_lt() {
2323}
2424
2525if version_lt " $( go_version) " " $go_version_minimum " ; then
26- echo " SubnetEVM requires Go >= $go_version_minimum , Go $( go_version) found." >&2
26+ echo " Precompile-EVM requires Go >= $go_version_minimum , Go $( go_version) found." >&2
2727 exit 1
2828fi
2929
@@ -44,10 +44,10 @@ if [[ $# -eq 1 ]]; then
4444elif [[ $# -eq 0 ]]; then
4545 BINARY_PATH=" $GOPATH /src/github.com/ava-labs/avalanchego/build/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy"
4646else
47- echo " Invalid arguments to build subnet -evm. Requires zero (default location) or one argument to specify binary location."
47+ echo " Invalid arguments to build precompile -evm. Requires zero (default location) or one argument to specify binary location."
4848 exit 1
4949fi
5050
5151# Build Subnet EVM, which is run as a subprocess
52- echo " Building Subnet-EVM version: $SUBNET_EVM_VERSION with Precompile at $BINARY_PATH "
52+ echo " Building Precompile-EVM with Subnet-EVM version: $SUBNET_EVM_VERSION at $BINARY_PATH "
5353go build -ldflags " -X github.com/ava-labs/subnet-evm/plugin/evm.Version=$SUBNET_EVM_VERSION $STATIC_LD_FLAGS " -o " $BINARY_PATH " " plugin/" * .go
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -o errexit
4+ set -o nounset
5+ set -o pipefail
6+
7+ if [ ! -f " coverage.out" ]; then
8+ echo " no coverage file"
9+ exit 0
10+ fi
11+
12+ totalCoverage=` go tool cover -func=coverage.out | grep total | grep -Eo ' [0-9]+\.[0-9]+' `
13+ echo " Current test coverage : $totalCoverage %"
14+ echo " ========================================"
15+
16+ go tool cover -func=coverage.out
You can’t perform that action at this time.
0 commit comments