Skip to content

Commit

Permalink
Add Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Mar 27, 2020
1 parent af0c89e commit f2a148b
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .azure/azure-linux-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
jobs:
- job: ${{ parameters.name }}
timeoutInMinutes: 180
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
GHC 8.6:
ARGS: "--resolver lts-14"
GHC 8.8:
ARGS: "--resolver lts-15"
steps:
- script: |
export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root;
export PATH=$HOME/.local/bin:$PATH
mkdir -p ~/.local/bin
curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
stack $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps
env:
OS_NAME: ${{ parameters.os }}
displayName: 'Build and test'
21 changes: 21 additions & 0 deletions .azure/azure-osx-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
jobs:
- job: ${{ parameters.name }}
timeoutInMinutes: 120
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
GHC 8.6:
ARGS: "--resolver lts-14"
GHC 8.8:
ARGS: "--resolver lts-15"
steps:
- script: |
export PATH=$HOME/.local/bin:$PATH
export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root;
mkdir -p ~/.local/bin
curl -skL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin;
stack $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps
env:
OS_NAME: ${{ parameters.os }}
displayName: 'Build and test'
30 changes: 30 additions & 0 deletions .azure/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This is the complex Azure configuration, which is intended for use
# on open source libraries which need compatibility across multiple GHC
# versions, must work with cabal-install, and should be
# cross-platform. For more information and other options, see:
#
# https://docs.haskellstack.org/en/stable/azure_ci/
#
# Copy these contents into the root directory of your Github project in a file
# named azure-pipelines.yml
#
# For better organization, you split various jobs into seprate parts
# and each of them are controlled via individual file.
jobs:
- template: azure-linux-template.yml
parameters:
name: Linux
vmImage: ubuntu-latest
os: linux

- template: azure-osx-template.yml
parameters:
name: macOS
vmImage: macOS-latest
os: osx

- template: azure-windows-template.yml
parameters:
name: Windows
vmImage: windows-latest
os: windows
18 changes: 18 additions & 0 deletions .azure/azure-windows-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
jobs:
- job: ${{ parameters.name }}
timeoutInMinutes: 120
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
GHC 8.6:
ARGS: "--resolver lts-14"
steps:
- bash: |
export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root;
curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip
unzip -o /usr/bin/stack.zip -d /usr/bin/
stack $ARGS test --bench --no-run-benchmarks
env:
OS_NAME: ${{ parameters.os }}
displayName: 'Build and test'
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
========

* Support `hoauth2-1.11.0`
* Expose `decodeKey`

# 0.2.2.0
========
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# wai-middleware-auth

[![Build Status](https://dev.azure.com/fpco/wai-middleware-auth/_apis/build/status/fpco.wai-middleware-auth?branchName=master)](https://dev.azure.com/fpco/wai-middleware-auth/_build/latest?definitionId=4&branchName=master)

Middleware that secures WAI application

## Installation
Expand Down
2 changes: 2 additions & 0 deletions src/Network/Wai/Middleware/Auth.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module Network.Wai.Middleware.Auth
, waiMiddlewareAuthVersion
, getAuthUser
, getDeleteSessionHeader
, decodeKey
) where

import Blaze.ByteString.Builder (fromByteString)
Expand All @@ -48,6 +49,7 @@ import Network.Wai (Middleware, Request,
import Network.Wai.Auth.AppRoot
import Network.Wai.Auth.ClientSession
import Network.Wai.Middleware.Auth.Provider
import Network.Wai.Auth.Tools (decodeKey)
import qualified Paths_wai_middleware_auth as Paths
import System.IO.Unsafe (unsafePerformIO)
import System.PosixCompat.Time (epochTime)
Expand Down
2 changes: 1 addition & 1 deletion wai-middleware-auth.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ library
Network.Wai.Auth.ClientSession
Network.Wai.Auth.Tools
build-depends: aeson
, base >= 4.9 && < 5
, base >= 4.12 && < 5
, base64-bytestring
, binary
, blaze-builder
Expand Down

0 comments on commit f2a148b

Please sign in to comment.