Make playground CI checks more robust.

This commit is contained in:
David Himmelstrup 2020-09-20 13:13:16 +08:00
commit 37aa90378e

View file

@ -25,31 +25,28 @@ jobs:
uses: actions/cache@v2
with:
path: |
~/.cabal
~/.stack
~/.stack-work
~/.dist-newstyle
~/.ghc
key: ${{ runner.os }}-${{ hashFiles('**/*.cabal') }}-cache
key: ${{ runner.os }}-${{ hashFiles('**/*.cabal') }}-cache-version2
- name: Install dependencies
run: |
cabal v2-update
cabal v2-build --enable-coverage --only-dependencies
sudo apt-get -y install texlive texlive-latex-base texlive-latex-extra
stack build --only-dependencies
(cd playground && stack build --only-dependencies)
- name: Build
run: |
cabal v2-build --enable-coverage
stack build
(cd playground && stack build)
- name: Playground
run: |
sudo apt-get -y install texlive texlive-latex-base texlive-latex-extra
CWD=`pwd`
stack build
cd playground
stack build
# We need to install latex before we can generate the snippets.
stack exec --cwd ../ playground snippets playground/snippets > viewer-elm/dist/snippets.js
cd viewer-elm
npm install
npm install || npm install || npm install
npm run build