2021-05-26 05:55:54 -07:00
|
|
|
name: Lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
|
2023-05-31 01:19:34 -07:00
|
|
|
env:
|
|
|
|
PYTHON_MIN_VERSION: "3.7.13"
|
2021-05-26 05:55:54 -07:00
|
|
|
|
2023-05-31 01:19:34 -07:00
|
|
|
jobs:
|
2024-01-27 13:28:35 -07:00
|
|
|
asdf-bash:
|
2022-12-23 02:53:22 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-10 07:26:05 -07:00
|
|
|
- uses: actions/checkout@v4
|
2023-11-08 07:44:11 -07:00
|
|
|
- uses: asdf-vm/actions/install@v3
|
2024-01-09 05:51:13 -07:00
|
|
|
- uses: actions/setup-python@v5
|
2023-01-22 09:01:42 -07:00
|
|
|
with:
|
2023-05-31 01:19:34 -07:00
|
|
|
python-version: ${{ env.PYTHON_MIN_VERSION }}
|
|
|
|
- run: scripts/install_dependencies.bash
|
|
|
|
- run: scripts/lint.bash --check
|
2022-12-23 02:53:22 -07:00
|
|
|
|
2024-01-27 13:28:35 -07:00
|
|
|
asdf-golang:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: '1.21.5'
|
|
|
|
- name: Install dependencies
|
|
|
|
run: go get .
|
2024-04-30 07:13:05 -07:00
|
|
|
- name: Install gofumpt for formatting
|
|
|
|
run: go install mvdan.cc/gofumpt@latest
|
|
|
|
- name: Run 'gofumpt'
|
|
|
|
run: gofumpt -l -w .
|
2024-01-27 13:28:35 -07:00
|
|
|
- name: Check format
|
|
|
|
run: '[ -z "$(gofmt -l ./...)" ]'
|
2024-04-30 07:13:05 -07:00
|
|
|
- name: Install revive for linting
|
|
|
|
run: go install github.com/mgechev/revive@latest
|
|
|
|
- name: Run 'revive'
|
|
|
|
run: revive -set_exit_status ./...
|
2024-01-27 13:28:35 -07:00
|
|
|
- name: Vet
|
|
|
|
run: go vet
|
|
|
|
- name: Install staticcheck for linting
|
|
|
|
run: go install honnef.co/go/tools/cmd/staticcheck@latest
|
|
|
|
- name: Lint
|
|
|
|
run: staticcheck -tests -show-ignored ./...
|
2024-01-27 13:35:27 -07:00
|
|
|
- name: Build
|
2024-02-03 12:46:46 -07:00
|
|
|
run: go build -v ./...
|
2024-01-27 13:28:35 -07:00
|
|
|
|
2023-05-31 01:19:34 -07:00
|
|
|
actions:
|
2023-01-22 08:36:43 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-10 07:26:05 -07:00
|
|
|
- uses: actions/checkout@v4
|
2023-01-22 08:36:43 -07:00
|
|
|
- name: Check workflow files
|
2023-05-31 01:19:34 -07:00
|
|
|
uses: docker://rhysd/actionlint:1.6.24
|
2023-01-22 08:36:43 -07:00
|
|
|
with:
|
|
|
|
args: -color
|