diff --git a/.azure/azure-linux-template.yml b/.azure/azure-linux-template.yml deleted file mode 100644 index ed7018a8..00000000 --- a/.azure/azure-linux-template.yml +++ /dev/null @@ -1,25 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - timeoutInMinutes: 180 - pool: - vmImage: ${{ parameters.vmImage }} - strategy: - matrix: - GHC 8.2: - ARGS: "--resolver lts-11" - GHC 8.4: - ARGS: "--resolver lts-12" - 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' diff --git a/.azure/azure-osx-template.yml b/.azure/azure-osx-template.yml deleted file mode 100644 index 3b4d25f7..00000000 --- a/.azure/azure-osx-template.yml +++ /dev/null @@ -1,25 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - timeoutInMinutes: 120 - pool: - vmImage: ${{ parameters.vmImage }} - strategy: - matrix: - GHC 8.2: - ARGS: "--resolver lts-11" - GHC 8.4: - ARGS: "--resolver lts-12" - 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' diff --git a/.azure/azure-pipelines.yml b/.azure/azure-pipelines.yml deleted file mode 100644 index 499b2ef5..00000000 --- a/.azure/azure-pipelines.yml +++ /dev/null @@ -1,30 +0,0 @@ -# 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 diff --git a/.azure/azure-windows-template.yml b/.azure/azure-windows-template.yml deleted file mode 100644 index dd6ed50f..00000000 --- a/.azure/azure-windows-template.yml +++ /dev/null @@ -1,22 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - timeoutInMinutes: 120 - pool: - vmImage: ${{ parameters.vmImage }} - strategy: - matrix: - GHC 8.2: - ARGS: "--resolver lts-11" - GHC 8.4: - ARGS: "--resolver lts-12" - 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' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..1bf32d17 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,52 @@ +name: Tests + +on: + pull_request: + push: + branches: + - master + +jobs: + build: + name: CI + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + args: + - "--resolver nightly" + - "--resolver lts-16" + - "--resolver lts-14" + - "--resolver lts-12" + - "--resolver lts-11" + - "--stack-yaml stack-persistent-211.yaml" + # Bugs in GHC make it crash too often to be worth running + exclude: + - os: windows-latest + args: "--resolver nightly" + - os: windows-latest + args: "--resolver lts-16" + - os: windows-latest + args: "--stack-yaml stack-persistent-211.yaml" + + steps: + - name: Clone project + uses: actions/checkout@v2 + +# Getting weird OS X errors... +# - name: Cache dependencies +# uses: actions/cache@v1 +# with: +# path: ~/.stack +# key: ${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml') }} +# restore-keys: | +# ${{ runner.os }}-${{ matrix.resolver }}- + + - name: Build and run tests + shell: bash + run: | + set -ex + stack upgrade + stack --version + stack test --fast --no-terminal ${{ matrix.args }} diff --git a/README.md b/README.md index fb6ae54c..14dd8280 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://dev.azure.com/yesodweb/yesod/_apis/build/status/yesodweb.yesod?branchName=master)](https://dev.azure.com/yesodweb/yesod/_build/latest?definitionId=3&branchName=master) +![Tests](https://github.com/yesodweb/yesod/workflows/Tests/badge.svg) # Yesod Web Framework diff --git a/stack-persistent-211.yaml b/stack-persistent-211.yaml new file mode 100644 index 00000000..883223ba --- /dev/null +++ b/stack-persistent-211.yaml @@ -0,0 +1,20 @@ +resolver: lts-16.20 +packages: +- ./yesod-core +- ./yesod-static +- ./yesod-persistent +- ./yesod-newsfeed +- ./yesod-form +- ./yesod-form-multi +- ./yesod-auth +- ./yesod-auth-oauth +- ./yesod-sitemap +- ./yesod-test +- ./yesod-bin +- ./yesod +- ./yesod-eventsource +- ./yesod-websockets +extra-deps: +- persistent-2.11.0.1@rev:0 +- persistent-template-2.9.1.0@rev:0 +- persistent-sqlite-2.11.0.0@rev:0 diff --git a/yesod-auth/ChangeLog.md b/yesod-auth/ChangeLog.md index faa0733f..fb9d5391 100644 --- a/yesod-auth/ChangeLog.md +++ b/yesod-auth/ChangeLog.md @@ -1,5 +1,9 @@ # ChangeLog for yesod-auth +## 1.6.10.1 + +* Add support for Persistent 2.11 [#1701](https://github.com/yesodweb/yesod/pull/1701) + ## 1.6.10 * Updated `AuthMessage` data type in `Yesod.Auth.Message` to accommodate registration flow where password is supplied initially: deprecated `AddressVerified` and split into `EmailVerifiedChangePass` and `EmailVerified` diff --git a/yesod-auth/yesod-auth.cabal b/yesod-auth/yesod-auth.cabal index 5de976ec..f936ca85 100644 --- a/yesod-auth/yesod-auth.cabal +++ b/yesod-auth/yesod-auth.cabal @@ -1,5 +1,5 @@ name: yesod-auth -version: 1.6.10 +version: 1.6.10.1 license: MIT license-file: LICENSE author: Michael Snoyman, Patrick Brisbin @@ -43,7 +43,7 @@ library , http-types , memory , nonce >= 1.0.2 && < 1.1 - , persistent >= 2.8 && < 2.11 + , persistent >= 2.8 && < 2.12 , random >= 1.0.0.2 , safe , shakespeare diff --git a/yesod-persistent/ChangeLog.md b/yesod-persistent/ChangeLog.md index 3ba8a38e..1aaa6c63 100644 --- a/yesod-persistent/ChangeLog.md +++ b/yesod-persistent/ChangeLog.md @@ -1,5 +1,9 @@ # ChangeLog for yesod-persistent +## 1.6.0.5 + +* Add support for Persistent 2.11 [#1701](https://github.com/yesodweb/yesod/pull/1701) + ## 1.6.0.4 * Fix test suite to be compatible with latest `persistent-template` diff --git a/yesod-persistent/test/Yesod/PersistSpec.hs b/yesod-persistent/test/Yesod/PersistSpec.hs index 6164d0d6..a08e475a 100644 --- a/yesod-persistent/test/Yesod/PersistSpec.hs +++ b/yesod-persistent/test/Yesod/PersistSpec.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings, TemplateHaskell, QuasiQuotes, TypeFamilies #-} {-# LANGUAGE EmptyDataDecls, FlexibleContexts, GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} diff --git a/yesod-persistent/yesod-persistent.cabal b/yesod-persistent/yesod-persistent.cabal index 99589ba4..37640d9b 100644 --- a/yesod-persistent/yesod-persistent.cabal +++ b/yesod-persistent/yesod-persistent.cabal @@ -1,5 +1,5 @@ name: yesod-persistent -version: 1.6.0.4 +version: 1.6.0.5 license: MIT license-file: LICENSE author: Michael Snoyman @@ -16,8 +16,8 @@ extra-source-files: README.md ChangeLog.md library build-depends: base >= 4.10 && < 5 , yesod-core >= 1.6 && < 1.7 - , persistent >= 2.8 && < 2.11 - , persistent-template >= 2.1 && < 2.9 + , persistent >= 2.8 && < 2.12 + , persistent-template >= 2.1 && < 2.10 , transformers >= 0.2.2 , blaze-builder , conduit