From 5f973b9f148e06f02457d6b8e4cf319fb39388d8 Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Fri, 19 Jul 2024 19:28:18 -0700 Subject: [PATCH] More work on CI, minio-hs compat --- .github/workflows/sandwich.yml | 17 +++- cabal.project | 2 +- demos/demo-webdriver-pool/app/Main.hs | 2 +- .../Test/Sandwich/WebDriver/Internal/Types.hs | 4 + .../src/Test/Sandwich/WebDriver/Types.hs | 4 + stack-9.4.8.yaml | 2 +- stack-9.4.8.yaml.lock | 6 +- stack-9.6.5.yaml | 59 ------------ stack-9.6.5.yaml.lock | 91 ------------------- stack-9.8.1.yaml | 2 +- stack.yaml | 2 +- stack.yaml.lock | 6 +- 12 files changed, 33 insertions(+), 164 deletions(-) delete mode 100644 stack-9.6.5.yaml delete mode 100644 stack-9.6.5.yaml.lock diff --git a/.github/workflows/sandwich.yml b/.github/workflows/sandwich.yml index a5fbf588..19b84de4 100644 --- a/.github/workflows/sandwich.yml +++ b/.github/workflows/sandwich.yml @@ -13,8 +13,8 @@ jobs: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] ghc: - - "8.6.5" - - "8.8.4" + # - "8.6.5" + # - "8.8.4" - "8.10.7" - "9.0.2" - "9.2.8" @@ -34,6 +34,11 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: cachix/install-nix-action@v27 + with: + # release-24.05 + nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/74435c9234c751e6786c5f3fd34ff6b0f0c13bd1.tar.gz + - uses: haskell/actions/setup@v2 id: setup-haskell-cabal name: Setup Haskell @@ -51,6 +56,12 @@ jobs: path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} + - name: Install pcre + if: runner.os == "macOS" + run: | + brew update + brew install pcre + - name: Build run: | cabal configure --enable-tests --enable-benchmarks --test-show-details=direct @@ -72,7 +83,7 @@ jobs: - ghc: "9.4.8" yaml: "stack-9.4.8.yaml" - ghc: "9.6.5" - yaml: "stack-9.6.5.yaml" + yaml: "stack.yaml" - ghc: "9.8.1" yaml: "stack-9.8.1.yaml" diff --git a/cabal.project b/cabal.project index 937adf56..6e406a94 100644 --- a/cabal.project +++ b/cabal.project @@ -55,7 +55,7 @@ source-repository-package source-repository-package type: git location: https://github.com/codedownio/minio-hs.git - tag: 768665c90321d118fdd3cde2c6ac6c01310d76a0 + tag: 1e63a0ec44fff374799b25a0a02c041eab664c4f source-repository-package type: git diff --git a/demos/demo-webdriver-pool/app/Main.hs b/demos/demo-webdriver-pool/app/Main.hs index aab78bb4..112c6c35 100644 --- a/demos/demo-webdriver-pool/app/Main.hs +++ b/demos/demo-webdriver-pool/app/Main.hs @@ -44,7 +44,7 @@ introduceWebDriverPool :: forall m context. ( ) => Int -> WdOptions -> SpecFree (LabelValue "webDriverPool" (Pool WebDriver) :> context) m () -> SpecFree context m () introduceWebDriverPool poolSize wdOptions' = introduceWith "Introduce webdriver pool" webDriverPool $ \action -> do wdOptions <- addCommandLineOptionsToWdOptions <$> getSomeCommandLineOptions <*> pure wdOptions' - bracket (newPool =<< mkSafeDefaultPoolConfig (allocateWebDriver wdOptions) cleanupWebDriver 30.0 poolSize) destroyAllResources $ \pool -> + bracket (newPool =<< mkSafeDefaultPoolConfig (allocateWebDriver wdOptions defaultOnDemandOptions) cleanupWebDriver 30.0 poolSize) destroyAllResources $ \pool -> void $ action pool where diff --git a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Types.hs b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Types.hs index 055fda00..db156d66 100644 --- a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Types.hs +++ b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Types.hs @@ -76,6 +76,10 @@ data OnDemandOptions = OnDemandOptions { -- | How to obtain Xvfb binary. , xvfbToUse :: XvfbToUse } +defaultOnDemandOptions = OnDemandOptions { + ffmpegToUse = UseFfmpegFromPath + , xvfbToUse = UseXvfbFromPath + } data HeadlessConfig = HeadlessConfig { headlessResolution :: Maybe (Int, Int) diff --git a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Types.hs b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Types.hs index 26e4b222..1759ccea 100644 --- a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Types.hs +++ b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Types.hs @@ -19,6 +19,10 @@ module Test.Sandwich.WebDriver.Types ( , WebDriverMonad , WebDriverSessionMonad + -- * On demand options + , OnDemandOptions + , defaultOnDemandOptions + -- * The Xvfb session , XvfbSession(..) , getXvfbSession diff --git a/stack-9.4.8.yaml b/stack-9.4.8.yaml index b9657a55..f629fe86 100644 --- a/stack-9.4.8.yaml +++ b/stack-9.4.8.yaml @@ -35,7 +35,7 @@ extra-deps: ## For sandwich-contexts - git: https://github.com/codedownio/minio-hs - commit: 768665c90321d118fdd3cde2c6ac6c01310d76a0 + commit: 1e63a0ec44fff374799b25a0a02c041eab664c4f ## For sandwich-contexts-docker diff --git a/stack-9.4.8.yaml.lock b/stack-9.4.8.yaml.lock index 5ad26d6f..6f4eb81f 100644 --- a/stack-9.4.8.yaml.lock +++ b/stack-9.4.8.yaml.lock @@ -82,15 +82,15 @@ packages: original: hackage: tls-2.0.1@sha256:6f93816f1b67efafe63a91296e047d6218ccdfd355cd17cd47c798871c871444,6046 - completed: - commit: 768665c90321d118fdd3cde2c6ac6c01310d76a0 + commit: 1e63a0ec44fff374799b25a0a02c041eab664c4f git: https://github.com/codedownio/minio-hs name: minio-hs pantry-tree: - sha256: 63fecbf5146f8704eba62c12ba86494f7bc477d8d882e74846ea0d1dfce03a1a + sha256: 6487e6cdf336fda12f9f4e88fb8edc17b3fd32e3f837b5a143237c3d80498929 size: 4744 version: 1.7.0 original: - commit: 768665c90321d118fdd3cde2c6ac6c01310d76a0 + commit: 1e63a0ec44fff374799b25a0a02c041eab664c4f git: https://github.com/codedownio/minio-hs - completed: commit: 8cf2e348999c6f8cf2bb2583b4f5f083fba5170c diff --git a/stack-9.6.5.yaml b/stack-9.6.5.yaml deleted file mode 100644 index ef638809..00000000 --- a/stack-9.6.5.yaml +++ /dev/null @@ -1,59 +0,0 @@ - -resolver: lts-22.27 - -nix: - pure: false - packages: - - pcre - - pkg-config - - zlib - -packages: -- ./sandwich -- ./sandwich-contexts -- ./sandwich-contexts-docker -- ./sandwich-contexts-kubernetes -- ./sandwich-contexts-minio -- ./sandwich-hedgehog -- ./sandwich-quickcheck -- ./sandwich-slack -- ./sandwich-webdriver - -extra-deps: -- vty-windows-0.2.0.0 - -## For sandwich-contexts - -- git: https://github.com/codedownio/minio-hs - commit: 768665c90321d118fdd3cde2c6ac6c01310d76a0 - -## For sandwich-contexts-docker - -- git: https://github.com/codedownio/docker-openapi.git - commit: 8cf2e348999c6f8cf2bb2583b4f5f083fba5170c - -## For sandwich-contexts-kubernetes - -- git: https://github.com/codedownio/kubernetes-client-haskell.git - # codedown-feb-2024 - commit: 82f233c98f7124786c689c2407e84b1b94dba32f - subdirs: - - kubernetes - - kubernetes-client - -- git: https://github.com/codedownio/haskell-oidc-client - # codedown-jan-2024-ghc96 - commit: 4c122412e80c45bd28d03ead16f1a153bd53fcf4 - -# https://github.com/kubernetes-client/haskell/issues/64 -# https://github.com/channable/vaultenv/issues/99 -- git: https://github.com/codedownio/hs-certificate - # codedown-feb-2024 - # This branch - # 1. Takes akshaymankar's fixes from https://github.com/haskell-tls/hs-certificate/pull/113 - # and rebases them on the most recent https://github.com/haskell-tls/hs-certificate master branch - # 2. Cherry-picks kazuyamamoto's commit switching the package tocrypton, from here: - # https://github.com/kazu-yamamoto/crypton-certificate/commit/c11bbbeec2360ce797c5eb3bd4953cbc5bf1a0d6 - commit: dcd0d5b200e96e90c6daa728585c23be5309a955 - subdirs: - - x509-validation diff --git a/stack-9.6.5.yaml.lock b/stack-9.6.5.yaml.lock deleted file mode 100644 index 3b7a23c5..00000000 --- a/stack-9.6.5.yaml.lock +++ /dev/null @@ -1,91 +0,0 @@ -# This file was autogenerated by Stack. -# You should not edit this file by hand. -# For more information, please see the documentation at: -# https://docs.haskellstack.org/en/stable/lock_files - -packages: -- completed: - hackage: vty-windows-0.2.0.0@sha256:91a11bab7bb79f8ee0d4a8166824ed855251cbac101eed3fdf607ad519a13557,2815 - pantry-tree: - sha256: 50d343eb4df5d1901b1773baeaff8ae7c6a88204d0997430e26f0dc50a1a63eb - size: 2160 - original: - hackage: vty-windows-0.2.0.0 -- completed: - commit: 768665c90321d118fdd3cde2c6ac6c01310d76a0 - git: https://github.com/codedownio/minio-hs - name: minio-hs - pantry-tree: - sha256: 63fecbf5146f8704eba62c12ba86494f7bc477d8d882e74846ea0d1dfce03a1a - size: 4744 - version: 1.7.0 - original: - commit: 768665c90321d118fdd3cde2c6ac6c01310d76a0 - git: https://github.com/codedownio/minio-hs -- completed: - commit: 8cf2e348999c6f8cf2bb2583b4f5f083fba5170c - git: https://github.com/codedownio/docker-openapi.git - name: docker-engine - pantry-tree: - sha256: 54977c879b4e3054579f231a3c015c4262c1ad0e94417f78d4fe743d975f54d1 - size: 3152 - version: 1.36.0.0 - original: - commit: 8cf2e348999c6f8cf2bb2583b4f5f083fba5170c - git: https://github.com/codedownio/docker-openapi.git -- completed: - commit: 82f233c98f7124786c689c2407e84b1b94dba32f - git: https://github.com/codedownio/kubernetes-client-haskell.git - name: kubernetes-client-core - pantry-tree: - sha256: 0cb86401de40cab1f2b32e37fb1d181d778ddc2a9205ec16a6cb45f1a790bf58 - size: 8368 - subdir: kubernetes - version: 0.4.3.0 - original: - commit: 82f233c98f7124786c689c2407e84b1b94dba32f - git: https://github.com/codedownio/kubernetes-client-haskell.git - subdir: kubernetes -- completed: - commit: 82f233c98f7124786c689c2407e84b1b94dba32f - git: https://github.com/codedownio/kubernetes-client-haskell.git - name: kubernetes-client - pantry-tree: - sha256: e1205ba33bd552ba23227eae6297728f01ecc07ab87c56413d99cb2cec9e89d1 - size: 2125 - subdir: kubernetes-client - version: 0.4.3.1 - original: - commit: 82f233c98f7124786c689c2407e84b1b94dba32f - git: https://github.com/codedownio/kubernetes-client-haskell.git - subdir: kubernetes-client -- completed: - commit: 4c122412e80c45bd28d03ead16f1a153bd53fcf4 - git: https://github.com/codedownio/haskell-oidc-client - name: oidc-client - pantry-tree: - sha256: d2f194f36144d7da1608fe2060d59e1d64341758fa9adf3473ff6c3d6da345e3 - size: 1846 - version: 0.8.0.0 - original: - commit: 4c122412e80c45bd28d03ead16f1a153bd53fcf4 - git: https://github.com/codedownio/haskell-oidc-client -- completed: - commit: dcd0d5b200e96e90c6daa728585c23be5309a955 - git: https://github.com/codedownio/hs-certificate - name: crypton-x509-validation - pantry-tree: - sha256: a33d18d3ebc3011afac3a2fb39b1492b3c4687d332eb33ffcb4557bced4ce8a6 - size: 639 - subdir: x509-validation - version: 1.6.12 - original: - commit: dcd0d5b200e96e90c6daa728585c23be5309a955 - git: https://github.com/codedownio/hs-certificate - subdir: x509-validation -snapshots: -- completed: - sha256: bc144ddf301a5c99f2cf51c7de50279ba144fd4486cb3c66f87ed761d6bbf6e9 - size: 719131 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/27.yaml - original: lts-22.27 diff --git a/stack-9.8.1.yaml b/stack-9.8.1.yaml index 5b9dcb89..7f23b4e6 100644 --- a/stack-9.8.1.yaml +++ b/stack-9.8.1.yaml @@ -22,7 +22,7 @@ extra-deps: ## For sandwich-contexts - git: https://github.com/codedownio/minio-hs - commit: 768665c90321d118fdd3cde2c6ac6c01310d76a0 + commit: 1e63a0ec44fff374799b25a0a02c041eab664c4f ## For sandwich-contexts-docker diff --git a/stack.yaml b/stack.yaml index a2caa30a..e70999d1 100644 --- a/stack.yaml +++ b/stack.yaml @@ -67,7 +67,7 @@ extra-deps: ## For sandwich-contexts - git: https://github.com/codedownio/minio-hs - commit: 768665c90321d118fdd3cde2c6ac6c01310d76a0 + commit: 1e63a0ec44fff374799b25a0a02c041eab664c4f ## For sandwich-contexts-docker diff --git a/stack.yaml.lock b/stack.yaml.lock index 3b7a23c5..2b9a9158 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -12,15 +12,15 @@ packages: original: hackage: vty-windows-0.2.0.0 - completed: - commit: 768665c90321d118fdd3cde2c6ac6c01310d76a0 + commit: 1e63a0ec44fff374799b25a0a02c041eab664c4f git: https://github.com/codedownio/minio-hs name: minio-hs pantry-tree: - sha256: 63fecbf5146f8704eba62c12ba86494f7bc477d8d882e74846ea0d1dfce03a1a + sha256: 6487e6cdf336fda12f9f4e88fb8edc17b3fd32e3f837b5a143237c3d80498929 size: 4744 version: 1.7.0 original: - commit: 768665c90321d118fdd3cde2c6ac6c01310d76a0 + commit: 1e63a0ec44fff374799b25a0a02c041eab664c4f git: https://github.com/codedownio/minio-hs - completed: commit: 8cf2e348999c6f8cf2bb2583b4f5f083fba5170c