Commit b64a65d3 authored by Vaibhav Sagar's avatar Vaibhav Sagar

Test script now requires `jq`

parent cd9688f0
...@@ -53,7 +53,7 @@ jobs: ...@@ -53,7 +53,7 @@ jobs:
sudo apt update sudo apt update
- name: Install system dependencies - name: Install system dependencies
run: | run: |
sudo apt install libmagic-dev libgmp-dev libblas-dev liblapack-dev libcairo2-dev libpango1.0-dev libzmq3-dev sudo apt install libmagic-dev libgmp-dev libblas-dev liblapack-dev libcairo2-dev libpango1.0-dev libzmq3-dev jq
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v1 uses: actions/setup-python@v1
with: with:
......
...@@ -35,7 +35,7 @@ jobs: ...@@ -35,7 +35,7 @@ jobs:
matrix: matrix:
versions: versions:
- compiler: 'ghc884' - compiler: 'ghc884'
- compiler: 'ghc8102' - compiler: 'ghc8104'
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: cachix/install-nix-action@v12 - uses: cachix/install-nix-action@v12
...@@ -48,5 +48,8 @@ jobs: ...@@ -48,5 +48,8 @@ jobs:
-I nixpkgs=https://github.com/NixOS/nixpkgs/tarball/nixos-20.09 \ -I nixpkgs=https://github.com/NixOS/nixpkgs/tarball/nixos-20.09 \
release.nix \ release.nix \
--argstr compiler ${{ matrix.versions.compiler }} --argstr compiler ${{ matrix.versions.compiler }}
test/acceptance.nbconvert.sh result/bin/ihaskell-nbconvert nix-shell \
-I nixpkgs=https://github.com/NixOS/nixpkgs/tarball/nixos-20.09 \
-p jq --run \
'test/acceptance.nbconvert.sh result/bin/ihaskell-nbconvert'
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
# Run nbconvert acceptance tests # Run nbconvert acceptance tests
# ------------------------------ # ------------------------------
# #
# This script must be called from the root directory of IHaskell. # This script must be called from the root directory of IHaskell. It requires
# `jq` to be available in the $PATH.
# #
# Positional arguments to this script are the invocation for `nbconvert`. # Positional arguments to this script are the invocation for `nbconvert`.
# For example: # For example:
...@@ -27,7 +28,11 @@ ...@@ -27,7 +28,11 @@
set -euo pipefail set -euo pipefail
$* --to=notebook --execute --allow-errors --stdout test/acceptance.nbconvert.in.ipynb > test/acceptance.nbconvert.out.ipynb $* --to=notebook --execute --allow-errors --stdout --nbformat=4 test/acceptance.nbconvert.in.ipynb > test/acceptance.nbconvert.out.ipynb
diff <(grep -v -e 'version' -e 'Line ' -e 'Integral' test/acceptance.nbconvert.in.ipynb) <(grep -v -e 'version' -e 'Line ' -e 'Integral' test/acceptance.nbconvert.out.ipynb) diff \
<(grep -v -e 'version' -e 'Line ' -e 'Integral' -e 'Num' \
<(cat test/acceptance.nbconvert.in.ipynb | jq '{"cells": .cells | map(del(.metadata.execution)), "metadata": .metadata}')) \
<(grep -v -e 'version' -e 'Line ' -e 'Integral' -e 'Num' \
<(cat test/acceptance.nbconvert.out.ipynb | jq '{"cells": .cells | map(del(.metadata.execution)), "metadata": .metadata}'))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment