forked from malb/lattice-estimator
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.08 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Tests
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # weekly
env:
JOBS: 2
DEPS: sagemath
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out
uses: actions/checkout@v2
- name: Install prerequisites
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install $DEPS
- name: Test
run: |
export DOT_SAGE=$HOME/.sage/
pip install --upgrade pytest traitlets nbmake nbclient sphinxcontrib-jupyter
# TODO: for some strange reason it hangs otherwise
pip install --upgrade nbmake
# make jupyter notebooks
make jupyter
# We have to manually copy over those notebooks we want check
cp docs/_build/jupyter/prompt.ipynb .
cp docs/_build/jupyter/algorithms/*.ipynb .
# sage wants it
sudo mkdir -p /usr/share/sagemath/build/pkgs
# run tests
PYTHONIOENCODING=UTF-8 PYTHONPATH=`pwd` python -m pytest