mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
44 lines
925 B
YAML
44 lines
925 B
YAML
name: format
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- "rolling"
|
|
paths:
|
|
- 'lua/**'
|
|
- 'snapshots/**'
|
|
- 'tests/**'
|
|
- 'utils/**'
|
|
|
|
jobs:
|
|
stylua-check:
|
|
name: "Formatting check with Stylua"
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Lint with stylua
|
|
uses: JohnnyMorganz/stylua-action@1.0.0
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
# CLI arguments
|
|
args: --check .
|
|
|
|
shfmt-check:
|
|
name: "Formatting check with shfmt"
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: "1.16"
|
|
|
|
- name: Use shfmt
|
|
run: |
|
|
GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
|
|
|
|
# https://google.github.io/styleguide/shellguide.html
|
|
- name: Check formatting
|
|
run: make style-sh
|