Skip to content

Commit

Permalink
Add back whitespace workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Mar 14, 2024
1 parent cafb4bb commit d5ed8f1
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/whitespace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Whitespace

on:
pull_request:
push:
branches: ["master"]

jobs:
whitespace:
runs-on: ubuntu-latest

env:
fix-whitespace-ver: '0.1'

steps:
- uses: actions/checkout@v4

- name: Create directory for binary
run: |
mkdir -p $HOME/.local/bin
- uses: actions/cache@v3
name: Cache the binary
id: cache
with:
path: "~/.local/bin"
key: fix-whitespace-${{ env.fix-whitespace-ver }}

- uses: haskell-actions/setup@v2
if: ${{ !steps.cache.outputs.cache-hit }}
with:
ghc-version: '9.8'
cabal-version: latest

- name: Install fix-whitespace
if: ${{ !steps.cache.outputs.cache-hit }}
run: |
cabal install --ignore-project --install-method=copy --installdir=$HOME/.local/bin fix-whitespace-${{ env.fix-whitespace-ver }}
strip $HOME/.local/bin/fix-whitespace
- name: Check Whitespace Conformance
run: |
$HOME/.local/bin/fix-whitespace --check

0 comments on commit d5ed8f1

Please sign in to comment.