Skip to content

Add simple CI for windows and macos #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
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.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@v1
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.8.1.0'

- name: Set up PostgreSQL
uses: ikalnytskyi/action-setup-postgres@v3
id: postgres
with:
username: ci
password: sw0rdfish
database: test

- name: Checkout
uses: actions/checkout@v3.0.2

- name: Cache
uses: actions/cache@v2.1.3
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-

- 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 }}