Skip to content

Commit 7d624af

Browse files
Migrate to Spago 1 and modernize CI (#3)
* Migrate to Spago 1 and preserve registry publication bounds * Modernize CI and pin PureScript formatting tools
1 parent 69ad15a commit 7d624af

9 files changed

Lines changed: 3124 additions & 390 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,43 @@
11
name: CI
22

3-
# Run CI when a PR is opened against the branch `main`
4-
# and when one pushes a commit to `main`.
53
on:
64
push:
75
branches: [main]
86
pull_request:
97
branches: [main]
108

11-
# Run CI on all 3 latest OSes
9+
permissions:
10+
contents: read
11+
1212
jobs:
1313
build:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v6
1818

1919
- name: Set up Node toolchain
20-
uses: actions/setup-node@v3
21-
with:
22-
node-version: "16"
23-
24-
- name: Cache NPM dependencies
25-
uses: actions/cache@v3
26-
env:
27-
cache-name: cache-node-modules
20+
uses: actions/setup-node@v6
2821
with:
29-
path: ~/.npm
30-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
31-
restore-keys: |
32-
${{ runner.os }}-build-${{ env.cache-name }}-
33-
${{ runner.os }}-build-
34-
${{ runner.os }}-
22+
node-version: "22"
23+
cache: npm
3524

3625
- name: Setup PureScript tooling
37-
run:
38-
npm i -g purescript@latest purs-tidy@latest purescript-psa@latest spago@next
26+
run: npm ci
3927

4028
- name: Cache PureScript dependencies
41-
uses: actions/cache@v3
29+
uses: actions/cache@v5
4230
with:
43-
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.yml') }}
31+
key: ${{ runner.os }}-spago-${{ hashFiles('spago.yaml', 'spago.lock', 'package-lock.json') }}
4432
path: |
4533
.spago
4634
output
4735
48-
# Compile the library/project
49-
# censor-lib: ignore warnings emitted by dependencies
50-
# strict: convert warnings into errors
51-
# Note: `purs-args` actually forwards these args to `psa`
5236
- name: Build the project
53-
run: |
54-
npx spago build
37+
run: npm run build
5538

56-
- name: Check Formatting
57-
if: runner.os == 'Linux'
58-
run: |
59-
npx purs-tidy check src
39+
- name: Test
40+
run: npm test
6041

42+
- name: Check Formatting
43+
run: npm run format:check

0 commit comments

Comments
 (0)