emacs-jupyter/.github/workflows/test.yml
2023-02-13 20:30:19 -06:00

48 lines
1.2 KiB
YAML

on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: purcell/setup-emacs@master
with:
version: 27.2
- run: |
cat << 'EOF' > script.sh
#!/usr/bin/env bash
mkdir -p $(jupyter --runtime-dir)
jupyter --paths
jupyter --version
jupyter kernelspec list
make dev
make compile
make test
EOF
cat << EOF > shell.nix
{ pkgs ? import <nixpkgs> {} }:
let
pypkgs = p: with p; [
jupyter-core
jupyter-client
ipykernel
notebook
];
in pkgs.mkShell {
packages = [
pkgs.pandoc
(pkgs.python3.withPackages pypkgs)
];
}
EOF
git clone https://github.com/cask/cask ~/.cask
export PATH=$HOME/.cask/bin:$PATH
chmod +x script.sh
nix-shell --run ./script.sh