@@ -19,13 +19,14 @@ jobs:
1919 - name : Checkout code
2020 uses : actions/checkout@v3
2121
22+ - name : Create empty go.sum if it doesn't exist
23+ run : touch go.sum
24+
2225 - name : Set up Go ${{ matrix.go-version }}
2326 uses : actions/setup-go@v3
2427 with :
2528 go-version : ${{ matrix.go-version }}
26-
27- - name : Install dependencies
28- run : go mod download
29+ cache : true
2930
3031 - name : Run unit tests
3132 run : go test -v ./...
3637 - name : Run tests with coverage
3738 run : go test -coverprofile=coverage.out -covermode=atomic ./...
3839
39- - name : Upload coverage to Codecov
40- uses : codecov/codecov-action@v3
41- with :
42- file : ./coverage.out
43- fail_ci_if_error : false
40+ - name : Display coverage
41+ run : go tool cover -func=coverage.out
4442
4543 integration-test :
4644 name : Integration Tests
@@ -50,10 +48,14 @@ jobs:
5048 - name : Checkout code
5149 uses : actions/checkout@v3
5250
51+ - name : Create empty go.sum if it doesn't exist
52+ run : touch go.sum
53+
5354 - name : Set up Go
5455 uses : actions/setup-go@v3
5556 with :
5657 go-version : 1.21
58+ cache : true
5759
5860 - name : Build
5961 run : go build -v -o stremax ./cmd/stremax
@@ -77,10 +79,17 @@ jobs:
7779 - name : Checkout code
7880 uses : actions/checkout@v3
7981
82+ - name : Create empty go.sum if it doesn't exist
83+ run : touch go.sum
84+
8085 - name : Set up Go
8186 uses : actions/setup-go@v3
8287 with :
8388 go-version : 1.21
89+ cache : true
8490
8591 - name : Run benchmarks
86- run : go test -bench=. -benchmem ./...
92+ run : go test -bench=. -benchmem ./... > benchmark-result.txt
93+
94+ - name : Display benchmark results
95+ run : cat benchmark-result.txt
0 commit comments