Avoid using partial functions from Data.List #51
Workflow file for this run
This file contains 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: Haskell CI | |
on: | |
push: | |
branches: [develop, main, master] | |
pull_request: | |
branches: [develop, main, master] | |
workflow_dispatch: # For manual triggering | |
schedule: | |
- cron: "3 14 15 * *" # 14:03 on the 15th of every month (UTC) | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ghc: ['8.8.4', '8.10.7', '9.0.2', '9.2.8', '9.4.8', '9.6.4', '9.8.2'] | |
fail-fast: false | |
name: Build with GHC ${{ matrix.ghc }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-cabal | |
with: | |
path: ~/.cabal | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Haskell setup | |
uses: haskell-actions/setup@main | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends libtcd-dev xtide xtide-data xtide-data-nonfree | |
cabal update | |
cabal build --enable-tests --enable-benchmarks -f werror --only-dependencies | |
- name: Build | |
run: | | |
cabal build --enable-tests --enable-benchmarks -f werror all | |
- name: Run tests | |
run: | | |
export HFILE_PATH=$(dpkg -L xtide-data-nonfree | grep '\.tcd$' | head -n1) | |
cabal test all | |
cabal exec TestTides Hinkley |