-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (58 loc) · 1.8 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- 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
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 }}-
- name: Setup PureScript tooling
run:
npm i -g purescript@latest purs-tidy@latest purescript-psa@latest spago@latest
- name: Cache PureScript dependencies
uses: actions/cache@v3
with:
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
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 --purs-args "--censor-lib --strict"
- name: Run tests
run: |
chmod +x test/regen-pem-files.sh
sh test/regen-pem-files.sh
npx spago -x test.dhall test
- name: Check Formatting
if: runner.os == 'Linux'
run: |
purs-tidy check src test