mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-15 19:06:06 +00:00
Test script now requires jq
This commit is contained in:
parent
cd9688f036
commit
b64a65d344
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -53,7 +53,7 @@ jobs:
|
||||
sudo apt update
|
||||
- name: Install system dependencies
|
||||
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
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
|
7
.github/workflows/nix.yml
vendored
7
.github/workflows/nix.yml
vendored
@ -35,7 +35,7 @@ jobs:
|
||||
matrix:
|
||||
versions:
|
||||
- compiler: 'ghc884'
|
||||
- compiler: 'ghc8102'
|
||||
- compiler: 'ghc8104'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: cachix/install-nix-action@v12
|
||||
@ -48,5 +48,8 @@ jobs:
|
||||
-I nixpkgs=https://github.com/NixOS/nixpkgs/tarball/nixos-20.09 \
|
||||
release.nix \
|
||||
--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 @@
|
||||
# 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`.
|
||||
# For example:
|
||||
@ -27,7 +28,11 @@
|
||||
|
||||
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}'))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user