mirror of
https://github.com/haskell-servant/servant-ekg.git
synced 2024-11-23 03:29:43 +01:00
Merge pull request #28 from peterbecich/basic-github-actions
basic GitHub Actions; fix tests; GHC 9 still failing
This commit is contained in:
commit
bda075f8f5
5 changed files with 76 additions and 1 deletions
69
.github/workflows/ci.yml
vendored
Normal file
69
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
# modified from https://github.com/jgm/pandoc/blob/master/.github/workflows/ci.yml
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
paths-ignore: []
|
||||||
|
pull_request:
|
||||||
|
paths-ignore: []
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linux:
|
||||||
|
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
versions:
|
||||||
|
- ghc: '8.6.5'
|
||||||
|
cabal: '3.6'
|
||||||
|
- ghc: '8.8.4'
|
||||||
|
cabal: '3.6'
|
||||||
|
- ghc: '8.10.7'
|
||||||
|
cabal: '3.6'
|
||||||
|
# - ghc: '9.0.2'
|
||||||
|
# cabal: '3.6'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# need to install older cabal/ghc versions from ppa repository
|
||||||
|
|
||||||
|
- name: Install recent cabal/ghc
|
||||||
|
uses: haskell/actions/setup@v1
|
||||||
|
with:
|
||||||
|
ghc-version: ${{ matrix.versions.ghc }}
|
||||||
|
cabal-version: ${{ matrix.versions.cabal }}
|
||||||
|
|
||||||
|
# declare/restore cached things
|
||||||
|
# caching doesn't work for scheduled runs yet
|
||||||
|
# https://github.com/actions/cache/issues/63
|
||||||
|
|
||||||
|
- name: Cache cabal global package db
|
||||||
|
id: cabal-global
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cabal
|
||||||
|
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-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 }}-${{ matrix.versions.cabal }}-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 | tee build.log
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
cabal test all --disable-optimization
|
|
@ -1,6 +1,7 @@
|
||||||
# servant-ekg
|
# servant-ekg
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/haskell-servant/servant-ekg.png)](https://travis-ci.org/haskell-servant/servant-ekg)
|
[![Build Status](https://travis-ci.org/haskell-servant/servant-ekg.png)](https://travis-ci.org/haskell-servant/servant-ekg)
|
||||||
|
[![Build status](https://github.com/haskell-servant/servant-ekg/actions/workflows/ci.yml/badge.svg)](https://github.com/haskell-servant/servant-ekg/actions/workflows/ci.yml)
|
||||||
|
|
||||||
# Servant Performance Counters
|
# Servant Performance Counters
|
||||||
|
|
||||||
|
|
1
cabal.project.local
Normal file
1
cabal.project.local
Normal file
|
@ -0,0 +1 @@
|
||||||
|
tests: True
|
|
@ -117,6 +117,10 @@ instance HasEndpoint (sub :: *) => HasEndpoint (Header' mods h a :> sub) where
|
||||||
getEndpoint _ = getEndpoint (Proxy :: Proxy sub)
|
getEndpoint _ = getEndpoint (Proxy :: Proxy sub)
|
||||||
enumerateEndpoints _ = enumerateEndpoints (Proxy :: Proxy sub)
|
enumerateEndpoints _ = enumerateEndpoints (Proxy :: Proxy sub)
|
||||||
|
|
||||||
|
instance HasEndpoint (sub :: *) => HasEndpoint (Fragment a :> sub) where
|
||||||
|
getEndpoint _ = getEndpoint (Proxy :: Proxy sub)
|
||||||
|
enumerateEndpoints _ = enumerateEndpoints (Proxy :: Proxy sub)
|
||||||
|
|
||||||
instance HasEndpoint (sub :: *) => HasEndpoint (QueryParam' mods (h :: Symbol) a :> sub) where
|
instance HasEndpoint (sub :: *) => HasEndpoint (QueryParam' mods (h :: Symbol) a :> sub) where
|
||||||
getEndpoint _ = getEndpoint (Proxy :: Proxy sub)
|
getEndpoint _ = getEndpoint (Proxy :: Proxy sub)
|
||||||
enumerateEndpoints _ = enumerateEndpoints (Proxy :: Proxy sub)
|
enumerateEndpoints _ = enumerateEndpoints (Proxy :: Proxy sub)
|
||||||
|
|
|
@ -13,7 +13,7 @@ maintainer:
|
||||||
|
|
||||||
category: Servant, Web, System
|
category: Servant, Web, System
|
||||||
build-type: Simple
|
build-type: Simple
|
||||||
tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2
|
tested-with: GHC ==8.6.5 || ==8.8.4 || ==8.10.7
|
||||||
extra-source-files: README.md CHANGELOG.md
|
extra-source-files: README.md CHANGELOG.md
|
||||||
|
|
||||||
source-repository HEAD
|
source-repository HEAD
|
||||||
|
|
Loading…
Reference in a new issue