mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-14 01:22:20 +00:00
Run playground tests on PRs without deploying to GitHub Pages. (#148)
This commit is contained in:
parent
00e2ba6eeb
commit
fb868cab9b
6 changed files with 86 additions and 34 deletions
4
.github/workflows/gh-pages.yml
vendored
4
.github/workflows/gh-pages.yml
vendored
|
|
@ -81,14 +81,16 @@ jobs:
|
|||
\"color\": \"success\" \
|
||||
}" > hpc/haddock_badge.json
|
||||
|
||||
# Is there a way to reuse the script from playground.yml?
|
||||
- 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
|
||||
stack exec --cwd ../ playground snippets playground/snippets > viewer-elm/dist/snippets.js
|
||||
cd viewer-elm
|
||||
npm install
|
||||
npm run build
|
||||
|
|
|
|||
55
.github/workflows/playground.yml
vendored
Normal file
55
.github/workflows/playground.yml
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
name: Playground checks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-haskell@v1
|
||||
with:
|
||||
ghc-version: '8.8'
|
||||
cabal-version: 'latest'
|
||||
- uses: jorelali/setup-elm@v2
|
||||
with:
|
||||
elm-version: 0.19.1
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cabal
|
||||
~/.stack
|
||||
~/.stack-work
|
||||
~/.dist-newstyle
|
||||
~/.ghc
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/*.cabal') }}-cache
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cabal v2-update
|
||||
cabal v2-build --enable-coverage --only-dependencies
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cabal v2-build --enable-coverage
|
||||
|
||||
- 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 run build
|
||||
Loading…
Reference in a new issue