LunarVim/.github/workflows/format.yaml

46 lines
941 B
YAML
Raw Normal View History

name: format
on:
pull_request:
branches:
- "master"
paths:
- 'lua/**'
- 'snapshots/**'
- 'tests/**'
- 'utils/**'
jobs:
stylua-check:
name: "Formatting check with Stylua"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Lint with stylua
uses: JohnnyMorganz/stylua-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
# CLI arguments
version: 0.15.3
args: --check .
2021-07-19 18:22:49 +02:00
shfmt-check:
name: "Formatting check with shfmt"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
2021-07-19 18:22:49 +02:00
- name: Setup Go
uses: actions/setup-go@v3
2021-07-19 18:22:49 +02:00
with:
go-version: "1.18"
2021-07-19 18:22:49 +02:00
- name: Use shfmt
run: |
go install mvdan.cc/sh/v3/cmd/shfmt@v3.6
2021-07-19 18:22:49 +02:00
# https://google.github.io/styleguide/shellguide.html
2021-07-19 18:22:49 +02:00
- name: Check formatting
run: make style-sh