Skip to content

formatting

formatting #591

Workflow file for this run

---
name: Stylua Formatting Check
on:
push:
pull_request:
workflow_dispatch:
jobs:
stylua:
name: stylua
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: date +%F > todays-date
# Cache Stylua
- name: Restore cache for Stylua
uses: actions/cache@v3
with:
path: .ci/stylua
key: stylua-${{ hashFiles('todays-date') }}
- name: Prepare Stylua
run: |
test -d .ci/stylua || {
mkdir -p .ci/stylua
curl -sL "https://github.com/JohnnyMorganz/StyLua/releases/download/v2.0.2/stylua-linux-x86_64.zip" -o stylua.zip
unzip stylua.zip -d .ci/stylua
chmod +x .ci/stylua/stylua
}
- name: Run Stylua
run: |
export PATH="${PWD}/.ci/stylua:${PATH}"
stylua --version
make -f ci/Makefile stylua