-
Notifications
You must be signed in to change notification settings - Fork 19
73 lines (69 loc) · 2.11 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# 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
- NG20
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest] # Once we get the tex packages changed, we should include "macos-13"
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Install Required Ubuntu Packages
run: |
sudo apt-get update
sudo apt-get install texlive-latex-base cm-super-minimal pdftk latex2html
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
init-shell: bash
environment-name: pulsar
cache-environment: true
cache-downloads: true
create-args: >-
-c conda-forge
python=${{ matrix.python-version }}
pytest
cython
pint-pulsar
tempo2
libstempo
enterprise-pulsar
enterprise_extensions
scikit-sparse
scikit-learn
ruamel.yaml
nbconvert
ipywidgets>=7.6.3
weasyprint
pytest-xdist>=2.3.0
jupyter
seaborn
gitpython
- name: Install Main Code
shell: bash -el {0}
run: |
pip install -e .
- name: Test with Standard Pulsar
shell: bash -el {0}
run: |
export PULSAR_NAME='J0605+3757'
export JUPYTER_PLATFORM_DIRS=1
pytest tests/test_run_notebook.py -k $PULSAR_NAME
ls -lah
mv tmp* nb_outputs
- name: Archive Notebook Output Files
uses: actions/upload-artifact@v4
with:
name: TestNB-OutputFiles_${{ matrix.python-version }}_${{ matrix.os }}_${{ steps.date.outputs.date }}
path: |
nb_outputs/*/*.pdf
nb_outputs/*/*.tim
nb_outputs/*/*.par
compression-level: 6