git.iko.soy/rowtype-yoga/purescript-yoga-actions
on main help sign in
113 lines 2.4 kB history raw
1# PureScript Yoga GitHub Actions
3Reusable GitHub Actions for PureScript Yoga packages.
5## Actions
7### `setup` - Complete PureScript Yoga Stack Setup
9Sets up everything needed to build and test PureScript Yoga packages:
10- Node.js 22+ (required for Spago's `node:sqlite` dependency)
11- Bun (for fast package installation)
12- PureScript compiler
13- Spago package manager
15#### Usage
17```yaml
18- uses: rowtype-yoga/purescript-yoga-actions/setup@main
19```
21#### With Custom Versions
23```yaml
24- uses: rowtype-yoga/purescript-yoga-actions/setup@main
25 with:
26 purescript-version: '0.15.15'
27 spago-version: 'unstable'
28 node-version: '22'
29 bun-version: 'latest'
30 install-deps: 'true'
31```
33#### Inputs
35| Input | Description | Default |
36|-------|-------------|---------|
37| `purescript-version` | PureScript compiler version | `0.15.15` |
38| `spago-version` | Spago version (`latest` or semver) | `latest` |
39| `bun-version` | Bun version | `latest` |
40| `install-deps` | Auto-run `bun install` | `true` |
42## Example Workflows
44### Basic Build
46```yaml
47name: CI
49on: [push, pull_request]
51jobs:
52 build:
53 runs-on: ubuntu-latest
54 steps:
55 - uses: actions/checkout@v4
56 - uses: rowtype-yoga/purescript-yoga-actions/setup@main
57 - run: spago build
58```
60### With Tests
62```yaml
63name: CI
65on: [push, pull_request]
67jobs:
68 test:
69 runs-on: ubuntu-latest
70 steps:
71 - uses: actions/checkout@v4
72 - uses: rowtype-yoga/purescript-yoga-actions/setup@main
73 - run: spago build
74 - run: spago test
75```
77### With Redis Service
79```yaml
80name: CI
82on: [push, pull_request]
84jobs:
85 test:
86 runs-on: ubuntu-latest
88 services:
89 redis:
90 image: redis:7-alpine
91 ports:
92 - 6380:6379
93 options: >-
94 --health-cmd "redis-cli ping"
95 --health-interval 10s
96 --health-timeout 5s
97 --health-retries 5
99 steps:
100 - uses: actions/checkout@v4
101 - uses: rowtype-yoga/purescript-yoga-actions/setup@main
102 - run: spago test
103```
105## Why Node 22 + Bun?
107**Node.js 22** is required because Spago 1.x uses the `node:sqlite` built-in module (only available in Node 22+). When you run `spago`, it executes with the system Node.js.
109**Bun** is used for incredibly fast npm package installation (`bun install` is much faster than `npm install`).
111## License
113MIT