feat: migrate to spago@next #127
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up a PureScript toolchain | |
uses: purescript-contrib/setup-purescript@main | |
with: | |
purescript: "latest" | |
purs-tidy: "latest" | |
spago: "unstable" | |
- name: Cache PureScript dependencies | |
uses: actions/cache@v4 | |
with: | |
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.lock') }} | |
path: | | |
.spago | |
output | |
- name: Setup node and npm | |
uses: actions/setup-node@v4 | |
- name: Cache NPM dependencies | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}- | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install NPM dependencies | |
run: npm install | |
- name: Build the project | |
run: npm run build | |
- name: Build and bundle tests | |
run: ./node_modules/@vercel/ncc/dist/ncc/cli.js build --minify test/index.js | |
- uses: ./test | |
with: | |
testinput: test | |
- name: Verify formatting | |
run: purs-tidy check src test |