name: Lint on: push: branches: - main pull_request: branches: - main jobs: lint: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Setup Python uses: actions/setup-python@v2 # For shfmt pre-commit hook - name: Setup Go uses: actions/setup-go@v2 with: go-version: "^1.14" - name: Cache uses: actions/cache@v2 with: path: | ~/.cache/pre-commit ~/.cache/pip key: lint-${{ hashFiles('.pre-commit-config.yaml') }} - name: Install pre-commit run: pip install -U pre-commit - name: Lint run: pre-commit run --color=always --all-files env: GO111MODULE: on