Skip to content

IHaskell.Eval.Evaluate: catch exceptions in extractValue (#1486) #143

IHaskell.Eval.Evaluate: catch exceptions in extractValue (#1486)

IHaskell.Eval.Evaluate: catch exceptions in extractValue (#1486) #143

Workflow file for this run

name: Stack (--nix)
on:
push:
paths-ignore:
- 'demo/**'
- 'docker/**'
- 'Dockerfile'
- '.dockerignore'
- '.ghci'
- '.gitignore'
- 'images/**'
- 'nix/**'
- 'notebooks/**'
- 'flake.nix'
- 'flake.lock'
- 'README.md'
- 'README.md'
- 'hie.yaml'
pull_request:
paths-ignore:
- 'demo/**'
- 'docker/**'
- 'Dockerfile'
- '.dockerignore'
- '.ghci'
- '.gitignore'
- 'images/**'
- 'nix/**'
- 'notebooks/**'
- 'flake.nix'
- 'flake.lock'
- 'README.md'
- 'README.md'
- 'hie.yaml'
jobs:
linux:
if: (github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
stack-yaml:
# - 'stack/stack-8.2.yaml'
# - 'stack/stack-8.4.yaml'
# - 'stack/stack-8.6.yaml'
# - 'stack/stack-8.8.yaml'
- 'stack/stack-8.10.yaml'
- 'stack/stack-9.0.yaml'
- 'stack/stack-9.2.yaml'
- 'stack/stack-9.4.yaml'
- 'stack/stack-9.6.yaml'
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
- uses: haskell-actions/setup@v2
name: Setup Haskell Stack
with:
enable-stack: true
stack-version: "latest"
- uses: actions/cache@v3
name: Cache Haskell dependencies
with:
path: |
~/.stack/stack.sqlite3
~/.stack/snapshots
key: ${{ matrix.stack-yaml }}-nix-${{ hashFiles(format('./{0}', matrix.stack-yaml)) }}
restore-keys: |
${{ matrix.stack-yaml }}-nix-${{ hashFiles(format('./{0}', matrix.stack-yaml)) }}
${{ matrix.stack-yaml }}-nix-
- name: Build
run: |
export "NIX_PATH=nixpkgs=$(nix run .#print-nixpkgs-master)"
stack build --nix --stack-yaml ${{matrix.stack-yaml}}
- name: Test
run: |
export "NIX_PATH=nixpkgs=$(nix run .#print-nixpkgs-master)"
stack test --nix --stack-yaml ${{matrix.stack-yaml}}
- name: Run integration test
run: |
set -e
export "NIX_PATH=nixpkgs=$(nix run .#print-nixpkgs-master)"
nix build .#jupyterlab
export PATH="$(pwd)/result/bin:$(pwd)/.local/bin:$PATH"
stack install --nix --stack-yaml ${{matrix.stack-yaml}}
ihaskell install --stack --stack-flag="--nix" --stack-flag="--stack-yaml=$(realpath ${{matrix.stack-yaml}})"
# Ensure that IHaskell notebook remains unchanged.
# Run the notebook to regenerate the outputs, then compare the new notebook to the old one.
test/acceptance.nbconvert.sh jupyter nbconvert