Skip to content

fixup: CI syntax error #4

fixup: CI syntax error

fixup: CI syntax error #4

Workflow file for this run

name: code validation
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: freckle/stack-action@v5
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: changed-files
uses: tj-actions/changed-files@v45
with:
files: "**/*.hs"
- uses: haskell-actions/hlint-setup@v2
- uses: haskell-actions/hlint-run@v2
with:
path: ${{ toJSON(steps.changed-files.all_changed_and_modified_files) }}
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: changed-files
uses: tj-actions/changed-files@v45
with:
files: "**/*.hs"
- env:
TARGETS: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
if test -n "$TARGETS"; then
curl -sL https://raw.github.com/haskell/stylish-haskell/master/scripts/latest.sh | sh -s .
stylish-haskell -i $TARGETS
for f in $(git diff --name-only --diff-filter=M); do
echo "::error file=$f::File is not formatted properly."
done
fi