Skip to content

Set up GHA #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
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
54 changes: 54 additions & 0 deletions .github/workflows/matrix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Matrix Build

on: pull_request

jobs:
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
versions:
# Three stable versions
- ghc: '9.10.1'
- ghc: '9.8.2'
- ghc: '9.6.5'
# Latest as moving target
- ghc: 'latest'
steps:
- uses: actions/checkout@v2

- name: Install recent cabal/ghc
uses: haskell/actions/setup@v1
with:
ghc-version: ${{ matrix.versions.ghc }}

- name: Install native leveldb
run: sudo apt-get install --yes libleveldb-dev libsnappy-dev

- name: Cache cabal global package db
id: cabal-global
uses: actions/cache@v2
with:
path: |
~/.cabal
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-cabal-global-${{ hashFiles('cabal.project') }}

- name: Cache cabal work
id: cabal-local
uses: actions/cache@v2
with:
path: |
dist-newstyle
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-cabal-local

- name: Install dependencies
run: |
cabal update
cabal build all --dependencies-only --enable-tests --disable-optimization
- name: Build
run: |
cabal build all --enable-tests --disable-optimization 2>&1
- name: Test
run: |
cabal test all --disable-optimization
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

5 changes: 0 additions & 5 deletions stack.yaml

This file was deleted.

1 change: 1 addition & 0 deletions test/Test/Streaming.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@

module Test.Streaming (tests) where

import Control.Applicative hiding (empty)

Check warning on line 9 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (9.8.2)

The import of ‘Control.Applicative’ is redundant

Check warning on line 9 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (9.8.2)

The import of ‘Control.Applicative’ is redundant

Check warning on line 9 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (latest)

The import of ‘Control.Applicative’ is redundant
import Control.Monad (liftM2, foldM)

Check warning on line 10 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (latest)

The import of ‘Control.Monad’ is redundant
import Control.Monad.Catch
import Control.Monad.Identity
import Control.Monad.IO.Class
import qualified Data.ByteString as BS
import Data.ByteString.Char8 (ByteString, singleton, unpack)
import Data.Default
import Data.Foldable (foldMap)

Check warning on line 17 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (9.8.2)

The import of ‘Data.Foldable’ is redundant

Check warning on line 17 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (9.8.2)

The import of ‘Data.Foldable’ is redundant

Check warning on line 17 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (latest)

The import of ‘Data.Foldable’ is redundant
import Data.List hiding (singleton)
import Data.Monoid

Check warning on line 19 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (9.8.2)

The import of ‘Data.Monoid’ is redundant

Check warning on line 19 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (9.8.2)

The import of ‘Data.Monoid’ is redundant

Check warning on line 19 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (latest)

The import of ‘Data.Monoid’ is redundant
import Database.LevelDB.Base
import Database.LevelDB.Internal (unsafeClose)
import qualified Database.LevelDB.Streaming as S
Expand Down Expand Up @@ -225,7 +226,7 @@
where
a = case asList range of
[] -> Nothing
xs -> Just . head $ xs

Check warning on line 229 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (9.8.2)

In the use of ‘head’

Check warning on line 229 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (9.8.2)

In the use of ‘head’
b = S.head . mkKeySlice range

prop_last rs range = run_prop rs a b
Expand All @@ -239,7 +240,7 @@
where
a = case asList range of
[] -> []
xs -> tail xs

Check warning on line 243 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (9.8.2)

In the use of ‘tail’

Check warning on line 243 in test/Test/Streaming.hs

View workflow job for this annotation

GitHub Actions / linux (9.8.2)

In the use of ‘tail’
b = S.toList . S.tail . mkKeySlice range

prop_init rs range = run_prop rs a b
Expand Down
Loading