2021-11-04 12:31:49 +00:00
|
|
|
name: Lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-11-05 16:36:47 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-11-04 12:31:49 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-12-10 08:48:00 +00:00
|
|
|
- name: Checkout
|
2022-03-04 19:35:27 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-12-10 08:48:00 +00:00
|
|
|
|
|
|
|
- name: Setup Python
|
2022-03-02 07:12:53 +00:00
|
|
|
uses: actions/setup-python@v3
|
2021-12-10 08:48:00 +00:00
|
|
|
|
|
|
|
# For shfmt pre-commit hook
|
|
|
|
- name: Setup Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: "^1.14"
|
|
|
|
|
|
|
|
- name: Cache
|
2022-03-23 08:09:07 +00:00
|
|
|
uses: actions/cache@v3
|
2021-12-10 08:48:00 +00:00
|
|
|
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
|
2021-11-09 10:05:29 +00:00
|
|
|
env:
|
2021-12-10 08:48:00 +00:00
|
|
|
GO111MODULE: on
|