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