diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml new file mode 100644 index 0000000..4881d42 --- /dev/null +++ b/.github/workflows/linters.yml @@ -0,0 +1,36 @@ +name: Linters + +on: [push, pull_request] + +defaults: + run: + shell: bash + +env: + GOLANGCI_VERSION: 1.31 + GOLANGCI_TIMEOUT: 10m0s + +jobs: + validate-commits: + runs-on: ubuntu-latest + steps: + - name: Check git commit messages (Commitsar Action) + uses: aevea/commitsar@v0.15.0 + + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + - name: golangci lint code (app) + uses: golangci/golangci-lint-action@v2 + continue-on-error: true + with: + version: 'v${{ env.GOLANGCI_VERSION }}' + args: --config .golangci.toml --color always --path-prefix app/ --timeout ${{ env.GOLANGCI_TIMEOUT }} + - name: golangci lint code (lib) + uses: golangci/golangci-lint-action@v2 + continue-on-error: true + with: + version: 'v${{ env.GOLANGCI_VERSION }}' + args: --config .golangci.toml --color always --path-prefix lib/ --timeout ${{ env.GOLANGCI_TIMEOUT }} \ No newline at end of file