Merge pull request #50 from ferus-web/graceful-exits #39
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: Format Code | |
| on: [ push, pull_request ] | |
| jobs: | |
| fmt: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'ferus-web/ferus' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache nimble | |
| id: cache-nimble | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.nimble | |
| key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nimble- | |
| - uses: jiro4989/setup-nim-action@v2 | |
| with: | |
| nim-version: '2.0.0' # 2.2.x cannot compile nph due to a regression | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install the formatter | |
| run: | | |
| nimble install nph -y && | |
| nph --version | |
| - name: Format the code | |
| run: ${{ github.workspace }}/scripts/format-code.sh |