-
Notifications
You must be signed in to change notification settings - Fork 18
56 lines (50 loc) · 1.6 KB
/
test_notebook.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: "Notebook Pipeline (Ubuntu)"
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8"]
steps:
- name: Install pdflatex
run: |
sudo apt-get update
sudo apt-get install texlive-latex-base pdftk latex2html
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
- name: Conda info
shell: bash -el {0}
run: conda info
- name: Install Dependencies & Main Code
shell: bash -el {0}
run: |
pip install --upgrade pip
pip install pytest
mamba install -c conda-forge python=${{ matrix.python-version }} cython=0.29.36 tempo2 scikit-sparse
pip install -e .
- name: Test with Standard Pulsar
shell: bash -el {0}
run: |
export PULSAR_NAME='J0605+3757'
export JUPYTER_PLATFORM_DIRS=1 && jupyter --paths
tree tests
pytest tests/test_run_notebook.py -n auto -k $PULSAR_NAME
mv tmp-* nb_outputs
- name: Archive Notebook Output Files
uses: actions/upload-artifact@v3
with:
name: TestNB-OutputFiles
path: |
nb_outputs