Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 50 additions & 2 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,17 @@ jobs:
- name: Build dependencies
run: cabal build --only-dependencies all -j4

- name: Build project
run: cabal build all -j4
- name: Build project with HIE files
run: cabal build all -j4 --ghc-options="-fwrite-ide-info -hiedir=.hiefiles"

- name: Upload weeder artifacts
uses: actions/upload-artifact@v4
with:
name: weeder-artifacts
path: |
.hiefiles
dist-newstyle/**/*.conf
retention-days: 1

test:
name: Test ${{ matrix.test-suite }}
Expand Down Expand Up @@ -190,6 +199,45 @@ jobs:
path: src/
fail-on: warning

weeder:
name: Check unused code (weeder)
needs: build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- uses: haskell-actions/setup@v2
with:
ghc-version: 9.12.2
cabal-version: 'latest'

- name: Cache weeder
id: cache-weeder
uses: actions/cache@v4
with:
path: ~/.local/bin/weeder
key: weeder-2.9.0-ghc-9.12.2

- name: Install weeder
if: steps.cache-weeder.outputs.cache-hit != 'true'
run: |
mkdir -p ~/.local/bin
cabal update
cabal install weeder-2.9.0 --install-method=copy --installdir=$HOME/.local/bin

- name: Download weeder artifacts
uses: actions/download-artifact@v4
with:
name: weeder-artifacts

- name: Run weeder
run: |
if [ ! -d ".hiefiles" ]; then
echo "Error: HIE files not found"
exit 1
fi
~/.local/bin/weeder --config config/weeder.toml

ui-tests:
name: UI Tests
runs-on: ubuntu-24.04
Expand Down
Loading