CI workflow / purs-tidy

This commit is contained in:
Nick Saunders 2023-03-06 18:05:32 -07:00
parent febb07ba50
commit c6d44ec2ca
2 changed files with 66 additions and 0 deletions

56
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,56 @@
name: CI
on:
push:
branches: [master]
paths:
- 'src/**/*.purs'
- 'src/**/*.js'
- 'test/**/*.purs'
- 'test/**/*.js'
- '*.dhall'
- '*.json'
- '.github/workflows/ci.yml'
pull_request:
branches: [master]
paths:
- 'src/**/*.purs'
- 'src/**/*.js'
- 'test/**/*.purs'
- 'test/**/*.js'
- '*.dhall'
- '*.json'
- '.github/workflows/ci.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: purescript-contrib/setup-purescript@main
with:
purescript: "unstable"
purs-tidy: "latest"
- uses: actions/cache@v2
with:
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
path: |
.spago
output
- run: spago install
- run: spago build --no-install --purs-args '--censor-lib --strict'
- run: spago -x test.dhall test
- run: purs-tidy check src test
- name: Verify Bower & Pulp
run: |
npm install bower pulp@16.0.0-0
npx bower install
npx pulp build -- --censor-lib --strict

10
.tidyrc.json Normal file
View File

@ -0,0 +1,10 @@
{
"importSort": "source",
"importWrap": "source",
"indent": 2,
"operatorsFile": null,
"ribbon": 1,
"typeArrowPlacement": "first",
"unicode": "never",
"width": null
}