This MR adds linting and formatting to the CI pipeline for the repository for both the Golang and Lua code.
40 lines
940 B
YAML
40 lines
940 B
YAML
name: Linting and Formatting
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
luacheck:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Luacheck linter
|
|
uses: lunarmodules/luacheck@v1
|
|
with:
|
|
args: --globals vim --no-max-line-length -- .
|
|
stylua:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Action
|
|
uses: JohnnyMorganz/stylua-action@v3
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
version: latest
|
|
args: --check .
|
|
golangci:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.19'
|
|
cache: false
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v3
|
|
with:
|
|
version: v1.54
|
|
only-new-issues: true
|