Merge pull request #58 from haskellari/issue-54 #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Simple | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
native: | |
name: "Simple: GHC ${{ matrix.ghc }} on ${{ matrix.os }}" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest] | |
ghc: ['8.10','9.0','9.2','9.4.8','9.6.3','9.8.1'] | |
fail-fast: false | |
timeout-minutes: | |
60 | |
steps: | |
- name: Set git to use LF | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- name: Set up Haskell | |
id: setup-haskell | |
uses: haskell/actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: '3.10.2.0' | |
- name: Set up PostgreSQL | |
uses: ikalnytskyi/action-setup-postgres@v3 | |
id: postgres | |
with: | |
username: ci | |
password: sw0rdfish | |
database: test | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Cache | |
uses: actions/[email protected] | |
with: | |
path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }} | |
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- | |
- name: cabal.project.local | |
if: matrix.os == 'windows-latest' | |
run: cp cabal.project.local.win cabal.project.local | |
- name: ghc-pkg dump | |
run: ghc-pkg list | |
- name: Build | |
run: cabal build all --enable-tests | |
- name: Test | |
run: cabal test all --enable-tests --test-show-details=direct | |
env: | |
DATABASE_CONNSTRING: ${{ steps.postgres.outputs.connection-uri }} |