@@ -30,54 +30,73 @@ jobs:
3030 steps :
3131 - uses : actions/checkout@v4
3232 name : Checkout code
33+
3334 - name : Get Golang version
3435 id : vars
3536 run : |
3637 GOLANG_VERSION=$(./hack/golang-version.sh)
3738 echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION := }" >> $GITHUB_ENV
39+
3840 - name : Install Go
3941 uses : actions/setup-go@v5
4042 with :
4143 go-version : ${{ env.GOLANG_VERSION }}
44+
4245 - name : Lint
4346 uses : golangci/golangci-lint-action@v8
4447 with :
4548 version : latest
4649 args : -v --timeout 5m
4750 skip-cache : true
51+
4852 - name : Check golang modules
4953 run : |
5054 make check-vendor
5155 make -C deployments/devel check-modules
56+
5257 test :
5358 name : Unit test
5459 runs-on : ubuntu-latest
5560 steps :
5661 - name : Checkout code
5762 uses : actions/checkout@v4
63+
5864 - name : Get Golang version
5965 id : vars
6066 run : |
6167 GOLANG_VERSION=$(./hack/golang-version.sh)
6268 echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION := }" >> $GITHUB_ENV
69+
6370 - name : Install Go
6471 uses : actions/setup-go@v5
6572 with :
6673 go-version : ${{ env.GOLANG_VERSION }}
67- - run : make test
74+
75+ - name : Run unit tests and generate coverage report
76+ run : make coverage
77+
78+ - name : Upload to Coveralls
79+ uses : coverallsapp/github-action@v2
80+ with :
81+ github-token : ${{ secrets.GITHUB_TOKEN }}
82+ file : coverage.out
83+
6884 build :
6985 name : Build
7086 runs-on : ubuntu-latest
7187 steps :
7288 - name : Checkout code
7389 uses : actions/checkout@v4
90+
7491 - name : Get Golang version
7592 id : vars
7693 run : |
7794 GOLANG_VERSION=$(./hack/golang-version.sh)
7895 echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION ?= }" >> $GITHUB_ENV
96+
7997 - name : Install Go
8098 uses : actions/setup-go@v5
8199 with :
82100 go-version : ${{ env.GOLANG_VERSION }}
101+
83102 - run : make build
0 commit comments