formatting #591
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| 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 |