-
-
Notifications
You must be signed in to change notification settings - Fork 126
66 lines (53 loc) · 2.38 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
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache PureScript dependencies
uses: actions/cache@v3
with:
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
path: |
.spago
output
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install dependencies
run: npm ci
- name: Build Insect
run: npm run build
- name: Check that index.cjs runs successfully
run: ./index.cjs '1 + 1'
- name: Run tests
run: npm test
- name: Generate README
uses: docker://pandoc/core:3.1
with:
entrypoint: ./docs/generate
- name: Check generated README is up to date
run: |
if [ -n "$(git status --porcelain README.md)" ]; then
echo 'There is a mismatch between the autogenerated `README.md` file and the source files in the `docs` directory. If you have edited `README.md` directly, please modify the files in `docs` instead, then run `./docs/generate`. If you already modified the files in `docs`, please run `./docs/generate`.'
echo 'Note that you need to have Pandoc (https://pandoc.org) installed to run `./docs/generate`. You can find the Pandoc version used by Insect in `.github/workflows/ci.yml` (note that the patch version is intentionally not specified in the workflow file, but it'\''s okay for you to have it).'
echo
echo "Here's the diff:"
git diff README.md
exit 1
fi
- name: Generate third-party licenses
run: ./generate-third-party-licenses.cjs
- name: Check generated third-party licenses list is up to date
run: |
if [ -n "$(git status --porcelain LICENSE_THIRDPARTY web/third-party-licenses.txt)" ]; then
echo 'There is a mismatch between the autogenerated third-party license list and what running `generate-third-party-licenses.cjs` generates. If you have edited LICENSE_THIRDPARTY or web/third-party-licenses.txt directly, please revert those changes. Otherwise, please run `node generate-third-party-licenses.cjs` locally and commit the changes to the license list to Git.'
exit 1
fi