name: Lint
on: [ push, pull_request ]
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - name: Install Go
        uses: actions/setup-go@v1
        with:
          go-version: 1.14.x
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Lint
        run: |
          curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0
          rm -r wasm
          go list -f '{{.Dir}}' ./...  | fgrep -v wasm | xargs realpath --relative-to=. | xargs $(go env GOPATH)/bin/golangci-lint run --timeout=5m -c .golangci.yml
