-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (49 loc) · 1.57 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
name: CI
on:
push:
branches: [master]
pull_request:
defaults:
run:
shell: bash
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
# os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
# Fetch all history and tags to ensure we get all commits made
# in the PR. Otherwise, we only fetch the commit that
# merges the PR's HEAD to the base branch and prune everything else.
# This causes the PR numbers to not appear in the commit titles
# and causes the `update` command's test to fail.
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
- uses: actions/cache@v3
# This cache uses the .dhall files to know when it should reinstall
# and rebuild packages. It caches both the installed packages from
# the `.spago` directory and compilation artifacts from the `output`
# directory. When restored the compiler will rebuild any files that
# have changed.
with:
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
path: |
.spago
output
- name: Install dependencies
run: npm install
- name: Build source
run: npm run build
- name: Build bin
run: npm run bundle
- name: "Run tests"
run: npm run test:ci
- name: Verify formatting (Ubuntu only)
if: runner.os == 'Linux'
run: npm run check