From 3afc94fbcc49c5ed2ad4a7721ff534606b4fd082 Mon Sep 17 00:00:00 2001 From: Nitin Prakash Date: Wed, 28 May 2025 14:20:58 +0530 Subject: [PATCH 1/2] Update CI to include test on macos and windowns runner --- .github/workflows/tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bbde1d2..dac1738 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,6 +11,12 @@ jobs: os: [ubuntu-latest] cabal: ["3.12.1.0"] ghc: ["9.6.7", "9.8.4", "9.10.2"] + include: + # Test only with latest GHC on windows and macOS + - os: macOS-latest # arm based macos system + ghc: 9.10.2 + - os: windows-latest + ghc: 9.10.2 steps: - name: Clone Repository uses: actions/checkout@v4 From d937c841d79788bca999c4f132aa26d6b9454d71 Mon Sep 17 00:00:00 2001 From: Nitin Prakash Date: Fri, 30 May 2025 11:07:52 +0530 Subject: [PATCH 2/2] limit allowed characters in domain name --- .github/workflows/tests.yml | 4 +--- test/TestData.hs | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dac1738..045d8f6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,11 +12,9 @@ jobs: cabal: ["3.12.1.0"] ghc: ["9.6.7", "9.8.4", "9.10.2"] include: - # Test only with latest GHC on windows and macOS + # Test only with latest GHC on macOS - os: macOS-latest # arm based macos system ghc: 9.10.2 - - os: windows-latest - ghc: 9.10.2 steps: - name: Clone Repository uses: actions/checkout@v4 diff --git a/test/TestData.hs b/test/TestData.hs index 081040b..98373b7 100644 --- a/test/TestData.hs +++ b/test/TestData.hs @@ -25,7 +25,7 @@ module TestData ) where -import Addy.Internal.Char (utf8NonAscii) +import Addy.Internal.Char (utf8NonAscii, atext) import Data.Aeson (FromJSON) import qualified Data.Aeson as Aeson import Data.Char @@ -200,7 +200,7 @@ genDomain = where okay :: Text -> Bool okay t = - Text.all allowedChar t + Text.all atext t && not (Text.isPrefixOf "-" t) && not (Text.isSuffixOf "-" t)