diff --git a/.github/workflows/lint-code.yml b/.github/workflows/lint-code.yml new file mode 100644 index 00000000..a91fccf1 --- /dev/null +++ b/.github/workflows/lint-code.yml @@ -0,0 +1,37 @@ +name: Lint code + +on: + push: + paths: + - ".github/workflows/lint-code.yml" + - "Taskfile.yml" + - "go.mod" + - "go.sum" + - "**/*.go" + pull_request: + paths: + - ".github/workflows/lint-code.yml" + - "Taskfile.yml" + - "go.mod" + - "go.sum" + - "**/*.go" + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout local repository + uses: actions/checkout@v2 + + - name: Install Taskfile + uses: arduino/actions/setup-taskfile@master + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + version: 3.x + + - name: Install golint + run: | + go get golang.org/x/lint/golint + + - name: Lint Go code + run: task go:lint