Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 15 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,43 @@
name: CI

# Run CI when a PR is opened against the branch `main`
# and when one pushes a commit to `main`.
on:
push:
branches: [main]
pull_request:
branches: [main]

# Run CI on all 3 latest OSes
permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6

- name: Set up Node toolchain
uses: actions/setup-node@v3
with:
node-version: "16"

- name: Cache NPM dependencies
uses: actions/cache@v3
env:
cache-name: cache-node-modules
uses: actions/setup-node@v6
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
node-version: "22"
cache: npm

- name: Setup PureScript tooling
run:
npm i -g purescript@latest purs-tidy@latest purescript-psa@latest spago@next
run: npm ci

- name: Cache PureScript dependencies
uses: actions/cache@v3
uses: actions/cache@v5
with:
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.yml') }}
key: ${{ runner.os }}-spago-${{ hashFiles('spago.yaml', 'spago.lock', 'package-lock.json') }}
path: |
.spago
output

# Compile the library/project
# censor-lib: ignore warnings emitted by dependencies
# strict: convert warnings into errors
# Note: `purs-args` actually forwards these args to `psa`
- name: Build the project
run: |
npx spago build
run: npm run build

- name: Check Formatting
if: runner.os == 'Linux'
run: |
npx purs-tidy check src
- name: Test
run: npm test

- name: Check Formatting
run: npm run format:check
Loading
Loading