Skip to content

Commit

Permalink
feat: Add CI to test
Browse files Browse the repository at this point in the history
  • Loading branch information
Cj-bc committed Dec 14, 2024
1 parent 0e7f7e0 commit ca1c9d1
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: library test

on:
push:
paths:
- '.github/workflows/*'
- 'app/*'
- 'Setup.hs'
- 'examples/*'
- '*.cabal'
- 'src/*'
- 'stack.yaml'
- 'test/*'

permissions:
contents: read

jobs:
testing:
runs-on: ubuntu-latest
strategy:
matrix:
snapshot:
- 'lts-18.5'
- 'lts-22.42'
steps:
- uses: actions/checkout@v4
- name: Cache stack global package db
id: stack-global
uses: actions/cache@v4
with:
path: |
~/.stack
key: ${{ matrix.snapshot }}--stack-global
- name: Cache stack work
id: stack-local
uses: actions/cache@v4
with:
path: |
.stack-work
key: ${{ matrix.snapshot }}--stack-local
- name: Build and test
run: |
stack test --stack-yaml stack-${{ matrix.snapshot }}.yaml
4 changes: 4 additions & 0 deletions stack-lts-18.5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resolver: lts-18.5
packages:
- .
extra-deps: []
5 changes: 5 additions & 0 deletions stack-lts-22.42.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resolver: lts-22.42
packages:
- .
extra-deps: []

0 comments on commit ca1c9d1

Please sign in to comment.