Skip to content

Commit aba8d53

Browse files
authored
sync: update CI config files (#147)
1 parent d82dff5 commit aba8d53

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/go-check.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ jobs:
2121
go mod tidy
2222
diff go.mod go.mod.orig
2323
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
2432
- name: go vet
2533
if: ${{ success() || failure() }} # run this step even if the previous one failed
2634
run: go vet ./...

.github/workflows/go-test.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,8 @@ jobs:
3131
- name: Run tests with race detector
3232
if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow
3333
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"
3934
- 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
4236
with:
4337
file: coverage.txt
4438
env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }}

0 commit comments

Comments
 (0)