Skip to content

Commit

Permalink
Merge pull request #994 from Vlix/fix-ci
Browse files Browse the repository at this point in the history
Update all stack files to fix CI
  • Loading branch information
Vlix authored May 28, 2024
2 parents 85ad932 + 71b6601 commit d50e118
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 114 deletions.
37 changes: 27 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,34 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
stack: ["latest"]
args:
- "--resolver nightly --stack-yaml stack-nightly.yaml"
- "--resolver lts-22"
- "--resolver lts-21 --stack-yaml stack-lts-21.yaml"
- "--resolver lts-20 --stack-yaml stack-lts-20.yaml"
- "--resolver lts-19 --stack-yaml stack-lts-19.yaml"
- "--resolver lts-18 --stack-yaml stack-lts-18.yaml"
- "--resolver nightly --stack-yaml stack-nightly.yaml"
- "--resolver lts-22"
- "--resolver lts-21 --stack-yaml stack-lts-21.yaml"
- "--resolver lts-20 --stack-yaml stack-lts-20.yaml"
- "--resolver lts-19 --stack-yaml stack-lts-19.yaml"
- "--resolver lts-18 --stack-yaml stack-lts-18.yaml"
exclude:
- os: "macos-latest"
args: "--resolver lts-19 --stack-yaml stack-lts-19.yaml"
- os: "macos-latest"
args: "--resolver lts-18 --stack-yaml stack-lts-18.yaml"

steps:
- name: Clone project
uses: actions/checkout@v4

# Not sure how to have GHC not setup twice
# Something with settings "ghc-version"?
# ["9.8", "9.6", "9.4", "9.2", "9.0", "8.10"]
- uses: haskell-actions/setup@v2
name: Setup Haskell Stack
with:
stack-version: ${{ matrix.stack }}
enable-stack: true

# Getting weird OS X errors...
# - name: Cache dependencies
# uses: actions/cache@v1
Expand All @@ -39,11 +54,13 @@ jobs:
shell: bash
run: |
set -ex
stack upgrade
stack --version
EXTRA=""
BENCH="--bench"
if [[ ${{ matrix.os }} = "windows-latest" ]]
then
EXTRA="--no-run-tests"
elif [[ ${{ matrix.os }} = "macos-latest" ]]
then
BENCH=""
fi
stack test --no-terminal ${{ matrix.args }} --haddock --no-haddock-deps --bench --no-run-benchmarks $EXTRA
stack test --no-terminal ${{ matrix.args }} --haddock --no-haddock-deps $BENCH --no-run-benchmarks $EXTRA
28 changes: 0 additions & 28 deletions stack-lts-14.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions stack-lts-17.yaml

This file was deleted.

7 changes: 4 additions & 3 deletions stack-lts-18.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-18
resolver: lts-18.28
packages:
- ./auto-update
- ./mime-types
Expand Down Expand Up @@ -26,8 +26,9 @@ extra-deps:
- crypton-x509-1.7.6
- crypton-x509-store-1.6.9
- crypton-x509-validation-1.6.12
- http2-5.1.0
- http-semantics-0.0.0
- http2-5.2.1
- network-byte-order-0.1.7
- network-control-0.0.2
- network-control-0.1.0
- tls-1.7.0
- unix-time-0.4.11
19 changes: 11 additions & 8 deletions stack-lts-19.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-19
resolver: lts-19.33
packages:
- ./auto-update
- ./mime-types
Expand All @@ -23,21 +23,24 @@ nix:
- fcgi
- zlib
extra-deps:
- crypto-token-0.0.2
- basement-0.0.16
- crypto-token-0.1.1
- crypton-0.34
- crypton-x509-1.7.6
- crypton-x509-store-1.6.9
- crypton-x509-system-1.6.7
- crypton-x509-validation-1.6.12
- fast-logger-3.2.2
- http2-5.1.0
- http3-0.0.8
- http-semantics-0.0.0
- http2-5.2.1
- http3-0.0.11
- memory-0.18.0
- network-3.1.4.0
- network-byte-order-0.1.7
- network-control-0.0.2
- network-control-0.1.0
- network-udp-0.0.0
- quic-0.1.12
- quic-0.1.20
- sockaddr-0.0.1
- tls-1.9.0
- unix-time-0.4.11
- tls-2.0.6
- tls-session-manager-0.0.5
- unix-time-0.4.12
18 changes: 10 additions & 8 deletions stack-lts-20.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-20
resolver: lts-20.26
packages:
- ./auto-update
- ./mime-types
Expand All @@ -24,21 +24,23 @@ nix:
- zlib
extra-deps:
- cgi-3001.5.0.1
- crypto-token-0.0.2
- crypto-token-0.1.1
- crypton-0.34
- crypton-x509-1.7.6
- crypton-x509-store-1.6.9
- crypton-x509-system-1.6.7
- crypton-x509-validation-1.6.12
- fast-logger-3.2.2
- http2-5.1.0
- http3-0.0.8
- http-semantics-0.0.0
- http2-5.2.1
- http3-0.0.11
- memory-0.18.0
- multipart-0.2.1
- network-byte-order-0.1.7
- network-control-0.0.2
- network-control-0.1.0
- network-udp-0.0.0
- quic-0.1.12
- quic-0.1.20
- sockaddr-0.0.1
- tls-1.9.0
- unix-time-0.4.11
- tls-2.0.6
- tls-session-manager-0.0.5
- unix-time-0.4.12
19 changes: 11 additions & 8 deletions stack-lts-21.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-21.21
resolver: lts-21.25
packages:
- ./auto-update
- ./mime-types
Expand All @@ -23,16 +23,19 @@ nix:
- fcgi
- zlib
extra-deps:
- crypto-token-0.0.2
- crypton-0.34
- crypto-token-0.1.1
- crypton-1.0.0
- crypton-x509-1.7.6
- crypton-x509-store-1.6.9
- crypton-x509-system-1.6.7
- crypton-x509-validation-1.6.12
- http2-5.1.0
- http3-0.0.8
- network-control-0.0.2
- http-semantics-0.0.0
- http2-5.2.1
- http3-0.0.11
- network-control-0.1.0
- network-udp-0.0.0
- quic-0.1.12
- quic-0.1.20
- sockaddr-0.0.1
- tls-1.9.0
- tls-2.0.6
- tls-session-manager-0.0.5
- unix-time-0.4.12
13 changes: 6 additions & 7 deletions stack-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ packages:
- ./wai-app-static
- ./wai-conduit
- ./wai-extra
# Needs 'multipart' to accept 'bytestring < 0.13'
# - ./wai-frontend-monadcgi
- ./wai-frontend-monadcgi
- ./wai-http2-extra
- ./wai-websockets
- ./warp
Expand All @@ -24,9 +23,9 @@ nix:
- fcgi
- zlib
extra-deps:
- crypto-token-0.1.0
- http2-5.1.0
- http3-0.0.8
- cgi-3001.5.0.1
- http3-0.0.11
- multipart-0.2.1
- network-udp-0.0.0
- quic-0.1.15
- sockaddr-0.0.1
- quic-0.1.20
- sockaddr-0.0.1
15 changes: 9 additions & 6 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-22.6
resolver: lts-22.23
packages:
- ./auto-update
- ./mime-types
Expand All @@ -23,10 +23,13 @@ nix:
- fcgi
- zlib
extra-deps:
- crypto-token-0.1.0
- http2-5.1.0
- http3-0.0.8
- crypto-token-0.1.1
- http-semantics-0.0.0
- http2-5.2.1
- http3-0.0.11
- network-control-0.1.0
- network-udp-0.0.0
- quic-0.1.14
- quic-0.1.20
- sockaddr-0.0.1
- tls-1.9.0
- tls-2.0.6
- tls-session-manager-0.0.5
16 changes: 8 additions & 8 deletions wai-extra/Network/Wai/Middleware/ValidateHeaders.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
--
-- 'validateHeadersMiddleware' enforces these constraints for response headers by responding with a 500 Internal Server Error when an offending character is present. This is meant to catch programmer errors early on and reduce attack surface.
module Network.Wai.Middleware.ValidateHeaders
-- * Middleware
( validateHeadersMiddleware
-- * Settings
( -- * Middleware
validateHeadersMiddleware
-- * Settings
, ValidateHeadersSettings (..)
, defaultValidateHeadersSettings
-- * Types
-- * Types
, InvalidHeader (..)
, InvalidHeaderReason (..)
) where
Expand Down Expand Up @@ -39,11 +39,11 @@ validateHeadersMiddleware settings app req respond =
Nothing -> respond response

-- | Configuration for 'validateHeadersMiddleware'.
--
--
-- @since 3.1.15
data ValidateHeadersSettings = ValidateHeadersSettings
-- | Called when an invalid header is present.
{ onInvalidHeader :: InvalidHeader -> Middleware
{ -- | Called when an invalid header is present.
onInvalidHeader :: InvalidHeader -> Middleware
}

-- | Default configuration for 'validateHeadersMiddleware'.
Expand Down Expand Up @@ -123,7 +123,7 @@ invalidHeaderResponse (InvalidHeader (headerName, headerValue) reason) =
, "In header '"
, BSL.fromStrict $ original headerName
, "' with value '"
, BSL.fromStrict $ headerValue
, BSL.fromStrict headerValue
, "': "
, showReason reason
, "\nYou are seeing this error message because validateHeadersMiddleware is enabled."
Expand Down

0 comments on commit d50e118

Please sign in to comment.