Skip to content

Commit 47d9bc5

Browse files
committed
update Stack build, provide GitHub Action coverage for Stack
1 parent 4262171 commit 47d9bc5

File tree

4 files changed

+66
-7
lines changed

4 files changed

+66
-7
lines changed

.github/workflows/stack.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Haskell Stack
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches:
10+
- '**'
11+
paths-ignore: []
12+
pull_request:
13+
paths-ignore: []
14+
15+
jobs:
16+
stack-build:
17+
runs-on: ubuntu-latest
18+
name: Haskell Stack
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: haskell-actions/setup@v2
22+
with:
23+
enable-stack: true
24+
stack-version: 'latest'
25+
26+
- uses: freckle/stack-cache-action@v2
27+
28+
- name: Build Haskell with Stack
29+
run: |
30+
stack build
31+
32+
- uses: purescript-contrib/setup-purescript@main
33+
with:
34+
spago: "unstable"
35+
36+
- name: Cache PureScript dependencies
37+
uses: actions/[email protected]
38+
with:
39+
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.yaml') }}
40+
path: |
41+
.spago
42+
output
43+
test/RoundTripArgonautAesonGeneric/app/output
44+
test/RoundTripJsonHelpers/app/output
45+
46+
- name: Build PureScript
47+
run: |
48+
spago build
49+
cd test/RoundTripArgonautAesonGeneric/app
50+
spago build
51+
cd ../../../
52+
cd test/RoundTripJsonHelpers/app
53+
spago build
54+
55+
- name: Haskell Tests with Stack
56+
run: |
57+
stack test

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# purescript-bridge
2-
[![Haskell library and example](https://github.com/eskimor/purescript-bridge/actions/workflows/haskell.yml/badge.svg)](https://github.com/eskimor/purescript-bridge/actions/workflows/haskell.yml) [![PureScript example](https://github.com/eskimor/purescript-bridge/actions/workflows/purescript.yml/badge.svg)](https://github.com/eskimor/purescript-bridge/actions/workflows/purescript.yml) [![Nix Flake](https://github.com/eskimor/purescript-bridge/actions/workflows/nix-flake.yml/badge.svg)](https://github.com/eskimor/purescript-bridge/actions/workflows/nix-flake.yml)
2+
[![Haskell and PureScript](https://github.com/eskimor/purescript-bridge/actions/workflows/haskell-and-purescript.yml/badge.svg)](https://github.com/eskimor/purescript-bridge/actions/workflows/haskell-and-purescript.yml)
3+
[![Haskell Stack and PureScript](https://github.com/eskimor/purescript-bridge/actions/workflows/stack.yml/badge.svg)](https://github.com/eskimor/purescript-bridge/actions/workflows/stack.yml)
4+
[![Nix Flake](https://github.com/eskimor/purescript-bridge/actions/workflows/nix-flake.yml/badge.svg)](https://github.com/eskimor/purescript-bridge/actions/workflows/nix-flake.yml)
35

46
Translate your Haskell types to PureScript types. It should in theory work for almost all Haskell types, including type constructors!
57
You just have to instantiate it with dummy parameters from e.g. "Language.PureScript.Bridge.TypeParameters".

stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resolver: lts-21.16
1+
resolver: lts-23.21
22
packages:
33
- '.'
44
- 'example/.'

stack.yaml.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# This file was autogenerated by Stack.
22
# You should not edit this file by hand.
33
# For more information, please see the documentation at:
4-
# https://docs.haskellstack.org/en/stable/lock_files
4+
# https://docs.haskellstack.org/en/stable/topics/lock_files
55

66
packages: []
77
snapshots:
88
- completed:
9-
sha256: 1d663bec402f77fa09fa3e8cf288c3c7eb18a1f28a5e0c331ac47adeacd21346
10-
size: 640034
11-
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/16.yaml
12-
original: lts-21.16
9+
sha256: f4a61482dcad21151331bf84ec85bee9be43965f143791fa4bb202ac1e443e1b
10+
size: 683833
11+
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/23/21.yaml
12+
original: lts-23.21

0 commit comments

Comments
 (0)