feat: migrate to spago@next #4
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: master | |
pull_request: | |
jobs: | |
test: | |
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 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18.x" | |
- uses: KengoTODA/actions-setup-docker-compose@main | |
with: | |
version: "2.29.7" # the full version of `docker compose version` command | |
- name: Setup env | |
run: cp .env-ci .env | |
- name: Start postgres db for PG test | |
run: docker compose up -d | |
- name: Build source | |
run: spago build --censor-stats --strict --pedantic-packages | |
- run: npm install --production | |
- run: npm run pretest | |
- name: Run tests | |
run: spago test --offline --censor-stats --strict --pedantic-packages -- --censor-codes=UserDefinedWarning | |
- name: Verify formatting | |
run: purs-tidy check src test |