Skip to content

Commit adba002

Browse files
committed
Add golangci-lint and codecov GitHub Actions
1 parent ed05fea commit adba002

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

.github/workflows/coder.yaml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ permissions:
2828
statuses: none
2929

3030
jobs:
31+
lint:
32+
name: lint/golangci
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: golangci-lint
37+
uses: golangci/golangci-lint-action@v2
38+
with:
39+
version: latest
40+
3141
style:
3242
name: "style/${{ matrix.style }}"
3343
runs-on: ubuntu-latest
@@ -81,9 +91,21 @@ jobs:
8191
with:
8292
go-version: "^1.17"
8393

84-
# Check that go is available
85-
# TODO: Implement actual test run
86-
- run: go version
94+
- run: go install gotest.tools/gotestsum@latest
95+
96+
- run: |
97+
gotestsum \
98+
--jsonfile="gotests.json" \
99+
--packages="./..." \
100+
-- \
101+
-covermode=atomic \
102+
-coverprofile="gotests.coverage"
103+
104+
- uses: codecov/codecov-action@v2
105+
with:
106+
token: ${{ secrets.CODECOV_TOKEN }}
107+
files: ./gotests.coverage
108+
fail_ci_if_error: true
87109

88110
test-js:
89111
name: "test/js"

0 commit comments

Comments
 (0)