Skip to content
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
35 changes: 26 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,35 @@ language: generic
dist: xenial
os: linux

env:
global:
# HACKAGE_USERNAME=[secure]
- secure: "C9c+Zf4yOTd7hL/no4y1WLs81unoo4j72qiO//pCNteiqK5DSHXeDdzRpolC2kPhPjKuS0Sw0fy/MoMDsaIiv/p/Cl+NyJLisKKn/VtYhFKIHh3ctgYkcQkddvaMwxkJxyq2xMHSr+VWSIzPdbH/r6H0pRcn8a4zcRKnbj2t12tcSEKVgZyi8pai1t8nuUJY57rvrvUtDtpExATAqn8rUHbAu8+lOwgMQgJlP3c7mz3ZZcSVf82fFtb6Z+BRBdV4TImq9pQOGzDcz79h0dvPeML/fUUHa1hSHKF7T+4yr3UXyYafJ8TojfiwalBmReiKRnAqa6Vp6JTM4wVfGj7Z1gJJ4YQFLFi8ZRhHsBxtF4JKuoV12SBFmeYMC2qmXjZKn1vOyfy1pY6yhk14saBZtZrxvxgdOjSEpukjqbne3q0ckMNVM9DxmILPvL4YUR8ayVvDMob97z43CVxEHKnCDloSkS6IH08v1P4SN3GXCEqo5eDQV+XvAXWby9MF7CU8Mp1HhUh/xX3pOs9RKqfvJ0MRW+j5MRP3a1fegpPntPn/M+L3/eqlGFcYhttpCxik2sfePeunh2xUGqVCN8JNvlIC3yLKgFTbdd8Tx/taTj2+ZlqnLdru1Rkcmelgj1O8eMtMh0/NP/ZsO/YfH2GYBcoPsZqpdFA01ZajonzOytA="
# HACKAGE_PASSWORD=[secure]
- secure: "KaSOcPujaJbGSY1/41vyaRCw2/bCUF021kO7nTVpO2lkwymJYgbcFuskBZC8JQN5NqiXrIgb0XM/N57l0/wNs+gyjDt7NWSF4OPxebiDxRN4BSejesiWXMafKthIlXn8lwhhAL7EYPGQ5ei/VwJUlClcOXGR08UxS1ePeABKzOX3qJZLCZf/9KmLm4k+GA2YXRCdA7BnQs7OtLg09lJ1EirZFBGCtak6xZ2FJqAXMimkdbAQMJrCIupPtr7sj2lnxACLc7G+JDqfGoqcpR0T6uV40pP90LGH+SLDzw3xCpnnqHNFC0RvcbgOHGWCPiSfowavbS0o+VPHAlXBOd7jgUaU0fys2AeTiWIyOnAvhQi3zv1PWx+CbCUxcx47wCAX6bMAkD4TG1RH2RxZWAZJIVyzA90RCmJL3I3AKh06F4wHzuqS91bcK0L5j7oTr3nhq82qFRxz58hNQKutSVWbdwE7BF2mlW8YXNRDSv84LQQkq8lqYU/5AAVXtj5p68+F6B0yOW2t9DE5zVHX1PATefNJjZ58prS6dbilTPSsNHsiDh3pheFfrhHIi7A4duPIHqXkjJKcZJ+KBgoZXAVnIERe+Hpe4AorPpeZ+FM6u4NvfAikiZryZoTh8sDVuVBIQNhE7OX1zn0uuDArlDugNMDcWPSOs5AuM73kP9Si9Hg="

cache:
timeout: 600
directories:
- $HOME/.local
- $HOME/.stack

before_install:
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://github.com/TokTok/hs-tools/releases/download/v0.6/hs-tools-v0.6.tar.gz | tar xz -C $HOME

script:
- hlint .
- stylish-haskell-lhs -i .
- git diff --exit-code
- stack --no-terminal test --coverage
- shc github-tools testsuite
- bash <(travis_retry curl -s https://raw.githubusercontent.com/TokTok/hs-tools/master/bin/travis-haskell) script
- eval $(travis-haskell env)

deploy:
provider: releases
token:
secure: "LpUAYk3pSGlTjakhkh/TzQTDCYj3upRlmEgq5VjyiM6Gsx+GybnQbrBDC2GBF7zOERkx535O0CBf4b7hvXJxNEVAjX5tGemqn8772xAbzAeVQogVUNc+WXRP7eBtcwhy8c/uC2iTHODAgfjOWqYZkyHcq8gMVON0JPgxQoGnue1KtItNlYOtEJgTfbsIW3bI1oACfyejmXIvpEGuuP/C282apMmLkkJGBZ45/YRJOXLqai6sWD9Zv7fIb5lfdlF0xA9waYcmRVgqYd9cAgOV++P9Rxs5s1rr9Qvmdqx71w4RhPQ2nXheF7zJMPBrA1dCVT5gRxxuNsMg8LJcyuGJZYg+XEQWiKk//G4vsVMgoXv87Quh3CfmHEcotQSKW5vbj/mKSa6fOhiEXLTxcrVE/X8CmV6ytlw1ZEt1CD8xIX1P7YGafSQmS4/3/I1D9VLUhHpFIaUZAtVtgX72lTIpj+oshwKoJk79skK6OEVST6XNi7MVpuBi30DmF7M8xvmT7cha3K6KVXZrhx8GkYxtjqFgDAozB2XI+Sd3VXJudNwLHI4m9HfRXLAezDkRBJGYOckEMyEiZLc7gV5175QbIsbInSxtO7fGFHIAUTM+ygCVxsfpzdb39bBZKY7w+Oe2NxupvHyvBmcQ7ZNRYq/1Yw07e2dK0XCKYRLvEouoU8I="
file: $PACKAGE-$VERSION.tar.gz
skip_cleanup: true
on:
repo: TokTok/hs-github-tools
tags: true

after_deploy: travis-haskell deploy

# Only build pull requests and releases, don't build master on pushes,
# except through api or cron.
if: type IN (pull_request, api, cron) OR tag IS present
8 changes: 4 additions & 4 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("@rules_haskell//haskell:defs.bzl", "haskell_library")
load("//third_party/haskell/hspec-discover:build_defs.bzl", "hspec_test")
load("//tools/project:build_defs.bzl", "project")

project()
project(standard_travis = True)

haskell_library(
name = "hs-github-tools",
Expand All @@ -13,7 +13,7 @@ haskell_library(
"-Wno-unused-imports",
],
src_strip_prefix = "src",
version = "0.1.1",
version = "0.1.2",
visibility = ["//visibility:public"],
deps = [
hazel_library("QuickCheck"),
Expand All @@ -39,8 +39,8 @@ haskell_library(
)

hspec_test(
name = "test",
timeout = "long",
name = "testsuite",
size = "small",
args = [
"-j4",
"+RTS",
Expand Down
31 changes: 15 additions & 16 deletions github-tools.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: github-tools
version: 0.1.1
version: 0.1.2
synopsis: Various Github helper utilities.
homepage: https://toktok.github.io/
license: GPL-3
Expand All @@ -15,7 +15,7 @@ description:

source-repository head
type: git
location: https://github.com/TokTok/github-tools.git
location: https://github.com/TokTok/hs-github-tools.git

library
exposed-modules:
Expand Down Expand Up @@ -108,6 +108,8 @@ library
Requests
ghc-options:
-Wall
hs-source-dirs: src
default-language: Haskell2010
build-depends:
base >= 4 && < 5
, aeson >= 0.8.1.0
Expand All @@ -116,7 +118,6 @@ library
, cryptohash
, exceptions
, github == 0.25
, groom
, html
, http-client >= 0.4.30
, http-client-tls
Expand All @@ -129,52 +130,55 @@ library
, unordered-containers
, uuid
, vector
hs-source-dirs: src
default-language: Haskell2010

executable hub-pulls
main-is: hub-pulls.hs
ghc-options:
-Wall
hs-source-dirs: tools
default-language: Haskell2010
build-depends:
base >= 4 && < 5
, bytestring
, github == 0.25
, github-tools
, text
hs-source-dirs: tools
default-language: Haskell2010

executable hub-changelog
main-is: hub-changelog.hs
ghc-options:
-Wall
hs-source-dirs: tools
default-language: Haskell2010
build-depends:
base >= 4 && < 5
, bytestring
, github == 0.25
, github-tools
, text
hs-source-dirs: tools
default-language: Haskell2010

executable hub-roadmap
main-is: hub-roadmap.hs
ghc-options:
-Wall
hs-source-dirs: tools
default-language: Haskell2010
build-depends:
base >= 4 && < 5
, bytestring
, github == 0.25
, github-tools
, text
hs-source-dirs: tools
default-language: Haskell2010

executable webservice
main-is: webservice.hs
ghc-options:
-Wall
hs-source-dirs: web
default-language: Haskell2010
other-modules:
TokTok.Hello
TokTok.Webhooks
build-depends:
base >= 4 && < 5
, Diff
Expand All @@ -197,11 +201,6 @@ executable webservice
, wai-cors
, wai-extra
, warp
hs-source-dirs: web
default-language: Haskell2010
other-modules:
TokTok.Hello
TokTok.Webhooks

test-suite testsuite
type: exitcode-stdio-1.0
Expand Down
6 changes: 4 additions & 2 deletions test/GitHub/Types/BaseSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
module GitHub.Types.BaseSpec where

import Data.Aeson (decode, encode)
import Test.Hspec
import Test.QuickCheck
import Test.Hspec (Spec, describe, it, parallel, shouldBe)
import qualified Test.QuickCheck as QC

import GitHub.Types.Base

property :: QC.Testable prop => prop -> QC.Property
property = QC.withMaxSuccess 20 . QC.property

spec :: Spec
spec =
Expand Down
7 changes: 5 additions & 2 deletions test/GitHub/Types/EventsSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
module GitHub.Types.EventsSpec where

import Data.Aeson (decode, encode)
import Test.Hspec
import Test.QuickCheck
import Test.Hspec (Spec, describe, it, parallel, shouldBe)
import qualified Test.QuickCheck as QC

import GitHub.Types.Events

property :: QC.Testable prop => prop -> QC.Property
property = QC.withMaxSuccess 20 . QC.property


spec :: Spec
spec =
Expand Down