dfhack/.github/workflows/lint.yml

45 lines
1.3 KiB
YAML

2023-08-03 01:25:20 -06:00
name: Lint
on:
workflow_call:
inputs:
dfhack_ref:
type: string
scripts_ref:
type: string
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Install Lua
run: |
sudo apt-get update
sudo apt-get install lua5.3
- name: Clone DFHack
uses: actions/checkout@v3
with:
2023-08-06 00:25:10 -06:00
repository: ${{ inputs.dfhack_ref && github.repository || 'DFHack/dfhack' }}
2023-08-03 01:25:20 -06:00
ref: ${{ inputs.dfhack_ref }}
- name: Get scripts submodule ref
if: '!inputs.scripts_ref'
id: scriptssubmoduleref
run: echo ref=$(git submodule | fgrep scripts | cut -c2-41) >> $GITHUB_OUTPUT
- name: Clone scripts
uses: actions/checkout@v3
with:
2023-08-06 00:25:10 -06:00
repository: ${{ inputs.scripts_ref && github.repository || 'DFHack/scripts' }}
2023-08-03 01:25:20 -06:00
ref: ${{ inputs.scripts_ref || steps.scriptssubmoduleref.outputs.ref }}
path: scripts
- name: Check whitespace
run: python ci/lint.py --git-only --github-actions
- name: Check Authors.rst
if: always()
run: python ci/authors-rst.py
- name: Check for missing documentation
if: always()
run: python ci/script-docs.py
- name: Check Lua syntax
if: always()
run: python ci/script-syntax.py --ext=lua --cmd="luac5.3 -p" --github-actions