chore: Add golangci-lint and codecov (#3)

* chore: Add golangci-lint and codecov

* Use consistent file names

* Format settings.json

* Add golangci-lint and codecov GitHub Actions

* Add base Go file for linting

* Add test coverage
This commit is contained in:
Kyle Carberry
2022-01-05 08:48:56 -06:00
committed by GitHub
parent 78973eaf3f
commit a6b2dd76a0
6 changed files with 324 additions and 3 deletions
+21 -3
View File
@@ -28,6 +28,16 @@ permissions:
statuses: none
jobs:
style-lint-golangci:
name: style/lint/golangci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
style:
name: "style/${{ matrix.style }}"
runs-on: ubuntu-latest
@@ -81,9 +91,17 @@ jobs:
with:
go-version: "^1.17"
# Check that go is available
# TODO: Implement actual test run
- run: go version
- run: go install gotest.tools/gotestsum@latest
# Windows is not happy with backslashed commands.
- run: gotestsum --jsonfile="gotests.json" --packages="./..." -- -covermode=atomic -coverprofile="gotests.coverage"
- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./gotests.coverage
flags: ${{ matrix.os }}
fail_ci_if_error: true
test-js:
name: "test/js"