File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 21
21
go mod tidy
22
22
diff go.mod go.mod.orig
23
23
diff go.sum go.sum.orig
24
+ - name : gofmt
25
+ if : ${{ success() || failure() }} # run this step even if the previous one failed
26
+ run : |
27
+ out=$(gofmt -s -l .)
28
+ if [[ -n "$out" ]]; then
29
+ echo $out | awk '{print "::error file=" $0 ",line=0,col=0::File is not gofmt-ed."}'
30
+ exit 1
31
+ fi
24
32
- name : go vet
25
33
if : ${{ success() || failure() }} # run this step even if the previous one failed
26
34
run : go vet ./...
Original file line number Diff line number Diff line change 31
31
- name : Run tests with race detector
32
32
if : ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow
33
33
run : go test -v -race ./...
34
- - name : Check if codecov.yml exists # only upload to Codecov if there's a codecov.yml
35
- id : check_codecov
36
- uses : andstor/file-existence-action@87d74d4732ddb824259d80c8a508c0124bf1c673 # v1.0.1
37
- with :
38
- files : " codecov.yml"
39
34
- name : Upload coverage to Codecov
40
- if : steps.check_codecov.outputs.files_exists == 'true'
41
- uses : codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 # v1.2.1
35
+ uses : codecov/codecov-action@fcebab03f26c7530a22baa63f06b3e0515f0c7cd # v1.3.1
42
36
with :
43
37
file : coverage.txt
44
38
env_vars : OS=${{ matrix.os }}, GO=${{ matrix.go }}
You can’t perform that action at this time.
0 commit comments