@@ -2,21 +2,21 @@ name: Go
22
33on :
44 push :
5- branches : [ main ]
5+ branches : [ v1 ]
66 pull_request :
7- branches : [ main ]
7+ branches : [ v1 ]
88
99jobs :
1010
1111 build :
1212 runs-on : ubuntu-latest
1313 steps :
14- - uses : actions/checkout@v2
14+ - uses : actions/checkout@v3
1515
1616 - name : Set up Go
17- uses : actions/setup-go@v2
17+ uses : actions/setup-go@v3
1818 with :
19- go-version : 1.15
19+ go-version : 1.19
2020
2121 - name : Static analysis of code for errors
2222 run : make analyze
@@ -44,35 +44,35 @@ jobs:
4444 # GOTOOLSBIN: ${{ github.workspace }}/tools/go
4545 # run: make test
4646
47- - name : Test - contents of make test!
48- run : |
49- set -x
50- echo "Running Plugin Manager Go Unit Tests...";
51- GOSRC=${{ github.workspace }}
52- GOCOVER=${{ github.workspace }}/cover
53- TOOLSBIN=${{ github.workspace }}/tools
54- GOTOOLSBIN=${{ github.workspace }}/tools/go
55- mkdir -p ${GOCOVER};
56- export INTEG_TEST_BIN=${GOSRC};
57- mkdir -p ${INTEG_TEST_BIN};
58- export PM_CONF_FILE=${GOSRC}/sample/pm.config.yaml;
59- export INTEGRATION_TEST=START;
60- cd ${GOSRC};
61- test_failed=0;
62- d=pm;
63- go test -mod=vendor -v --cover -covermode=count -coverprofile=${GOCOVER}/${d}.out ./... | ${GOTOOLSBIN}/go-junit-report > TEST-${d}.xml;
64- ret=${PIPESTATUS[0]};
65- if [ ${ret} -ne 0 ]; then
66- echo "Go unit test failed for ${d}.";
67- test_failed=1;
68- fi ;
69- cat TEST-${d}.xml
70- awk -f ${TOOLSBIN}/gocoverage-collate.awk ${GOCOVER}/* > ${GOCOVER}/cover.out;
71- go tool cover -html=${GOCOVER}/cover.out -o go-coverage-${d}.html;
72- ${GOTOOLSBIN}/gocov convert ${GOCOVER}/cover.out | ${GOTOOLSBIN}/gocov-xml > go-coverage-${d}.xml;
73- rm -rf ${GOCOVER}/*;
74- export INTEGRATION_TEST=DONE;
75- if [ ${test_failed} -ne 0 ]; then
76- echo "Go unit tests failed.";
77- exit 1;
78- fi
47+ # - name: Test - contents of make test!
48+ # run: |
49+ # set -x
50+ # echo "Running Plugin Manager Go Unit Tests...";
51+ # GOSRC=${{ github.workspace }}
52+ # GOCOVER=${{ github.workspace }}/cover
53+ # TOOLSBIN=${{ github.workspace }}/tools
54+ # GOTOOLSBIN=${{ github.workspace }}/tools/go
55+ # mkdir -p ${GOCOVER};
56+ # export INTEG_TEST_BIN=${GOSRC};
57+ # mkdir -p ${INTEG_TEST_BIN};
58+ # export PM_CONF_FILE=${GOSRC}/sample/pm.config.yaml;
59+ # export INTEGRATION_TEST=START;
60+ # cd ${GOSRC};
61+ # test_failed=0;
62+ # d=pm;
63+ # go test -mod=vendor -v --cover -covermode=count -coverprofile=${GOCOVER}/${d}.out ./... | ${GOTOOLSBIN}/go-junit-report > TEST-${d}.xml;
64+ # ret=${PIPESTATUS[0]};
65+ # if [ ${ret} -ne 0 ]; then
66+ # echo "Go unit test failed for ${d}.";
67+ # test_failed=1;
68+ # fi ;
69+ # cat TEST-${d}.xml
70+ # awk -f ${TOOLSBIN}/gocoverage-collate.awk ${GOCOVER}/* > ${GOCOVER}/cover.out;
71+ # go tool cover -html=${GOCOVER}/cover.out -o go-coverage-${d}.html;
72+ # ${GOTOOLSBIN}/gocov convert ${GOCOVER}/cover.out | ${GOTOOLSBIN}/gocov-xml > go-coverage-${d}.xml;
73+ # rm -rf ${GOCOVER}/*;
74+ # export INTEGRATION_TEST=DONE;
75+ # if [ ${test_failed} -ne 0 ]; then
76+ # echo "Go unit tests failed.";
77+ # exit 1;
78+ # fi
0 commit comments