Update README.md #215
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |