Skip to content

Add github action to type check lua files #327

Add github action to type check lua files

Add github action to type check lua files #327

Workflow file for this run

name: Pull Request
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
stylua:
name: Stylua
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: JohnnyMorganz/stylua-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: 0.16.0
args: --check .
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Prettier
uses: creyD/prettier_action@v4.3
with:
# Options for the `prettier` command
prettier_options: --check **/*.{md,json,js}
# Running the script in dry mode just shows whether there are files that should be prettified or not
dry: true
# GitHub Token or PAT token used to authenticate against a repository
github_token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
emmyLua:
name: EmmyLua Type Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: main
- name: Checkout neovim lua types
uses: actions/checkout@v4
with:
repository: folke/neodev.nvim
path: neodev
- uses: mrcjkb/lua-typecheck-action@v0.1.1
with:
configpath: "main/.luarc.json"
directories: |
main/dot_config/nvim/lua