2022-05-25 19:28:08 +00:00
|
|
|
name: CI
|
2021-03-22 19:20:17 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-05-25 19:28:08 +00:00
|
|
|
branches: [main]
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
2021-03-22 19:20:17 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-05-25 19:28:08 +00:00
|
|
|
build:
|
2021-03-22 19:20:17 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2022-05-25 19:28:08 +00:00
|
|
|
- uses: actions/checkout@v2
|
2021-03-22 19:20:17 +00:00
|
|
|
|
2022-05-25 19:28:08 +00:00
|
|
|
- name: Set up a PureScript toolchain
|
|
|
|
uses: purescript-contrib/setup-purescript@main
|
2021-03-22 19:20:17 +00:00
|
|
|
with:
|
2022-05-25 19:28:08 +00:00
|
|
|
purescript: "unstable"
|
|
|
|
purs-tidy: "latest"
|
2021-11-13 07:46:59 +00:00
|
|
|
|
2022-05-25 19:28:08 +00:00
|
|
|
- name: Cache PureScript dependencies
|
|
|
|
uses: actions/cache@v2
|
2022-05-05 06:33:37 +00:00
|
|
|
with:
|
2022-05-25 19:28:08 +00:00
|
|
|
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
|
|
|
|
path: |
|
|
|
|
.spago
|
|
|
|
output
|
|
|
|
- name: Install dependencies
|
|
|
|
run: spago install
|
|
|
|
|
|
|
|
- name: Build source
|
|
|
|
run: spago build --no-install --purs-args '--censor-lib --strict'
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: spago -x test.dhall test
|
|
|
|
|
|
|
|
- name: Check formatting
|
|
|
|
run: purs-tidy check src test
|
|
|
|
|
|
|
|
- name: Verify Bower & Pulp
|
|
|
|
run: |
|
|
|
|
npm install bower pulp@16.0.0
|
|
|
|
npx bower install
|
|
|
|
npx pulp build -- --censor-lib --strict
|