Implement nix run

This commit is contained in:
Jack Hodgkinson 2022-02-14 14:18:49 +00:00
parent 2e895f4490
commit 144bc963c3
2 changed files with 13 additions and 43 deletions

View file

@ -15,42 +15,21 @@ on:
- "flake.lock"
- "agora.cabal"
jobs:
# check-formatting:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2.4.0
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
# - uses: actions/cache@v2.1.4
# name: Add Stack files to cache
# with:
# path: ~/.stack
# key: ${{ runner.os }}-stack-formatting
# restore-keys: ${{ runner.os }}-stack-
- run: ./.github/format.sh
name: Run fourmolu
# - run: stack install fourmolu
# name: Install fourmolu
run-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
# - run: ./.github/format.sh
# name: Run fourmolu
# run-linter:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2.4.0
# # - uses: actions/cache@v2.1.4
# # name: Add Stack files to cache
# # with:
# # path: ~/.stack
# # key: ${{ runner.os }}-stack-lint
# # restore-keys: ${{ runner.os }}-stack-
# # - run: stack install hlint
# # name: Install hlint
# # - run: ~/.local/bin/hlint $(git ls-tree -r HEAD --full-tree --name-only | grep -E '.*\.hs')
# - run: hlint $(git ls-tree -r HEAD --full-tree --name-only | grep -E '.*\.hs')
# name: Run hlint
- run: nix run nixpkgs#hlint -- $(git ls-tree -r HEAD --full-tree --name-only | grep -E '.*\.hs')
name: Run hlint
check-build:
runs-on: ubuntu-latest
@ -79,12 +58,3 @@ jobs:
key: ${{ runner.os }}-cabal
- name: Build the project
run: nix build
- name: Enter Nix environment
run: nix develop
- run: ./.github/format.sh
name: Run fourmolu
- run: hlint $(git ls-tree -r HEAD --full-tree --name-only | grep -E '.*\.hs')
name: Run hlint