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 9a731c4
Show file tree
Hide file tree
Showing 3 changed files with 54 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
5 changes: 5 additions & 0 deletions stack-lts-18.5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resolver: lts-18.5
packages:
- .
extra-deps:
- hosc-0.20@sha256:5aa9985a65a7b31fd3707dc04bf6221273a83d2f47009f816622114ff6c59bac,2077
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 9a731c4

Please sign in to comment.