-
Notifications
You must be signed in to change notification settings - Fork 14
103 lines (89 loc) · 3.31 KB
/
doc.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# This is a basic workflow to help you get started with Actions
name: tests
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# Run in all these versions of Python
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
pip install numpy
pip install six>=1.13
pip install traits
pip install python-dateutil
pip install nipype
pip install git+https://github.com/populse/soma-base.git
pip install git+https://github.com/populse/soma-workflow.git
pip install git+https://github.com/populse/populse_db.git
python setup.py install
- name: "Run tests"
run: |
python -m capsul.test
documentation:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: "Set up Python 3.9"
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: "Install Python dependencies"
run: |
pip3 install setuptools
pip3 install numpy 'six>=1.13' 'argparse' 'traits>=4.0' 'populse-db>=2.2' 'PyYAML' 'PyQt5' # 'soma-base>=5.1' 'soma-workflow>=3.3'
# for docs only
sudo apt-get install -y pandoc graphviz
pip install sphinx sphinx-gallery pandoc nbsphinx ipykernel
python -m ipykernel install --user --name python3
# while soma-base 5.1 is not in pip yet
pushd ..
git clone https://github.com/populse/soma-base.git
cd soma-base
python setup.py install
popd
# while soma-workflow 3.3 is not in pip yet
pushd ..
git clone https://github.com/populse/soma-workflow.git
cd soma-workflow
python setup.py install
popd
- name: "Build Sphinx Doc"
run: |
export PYTHONPATH=$PWD
export CAPSUL_SOURCE_DIR=$PWD
cd doc
export SOMABASE_INTERSPHINX_URL=https://populse.github.io/soma-base
export SOMAWORKFLOW_INTERSPHINX_URL=http://populse.github.io/soma-workflow
export QT_API=pyqt5
python -m sphinx -b html source build/html
touch build/html/.nojekyll
cd ..
- name: "Deploy Github Pages"
uses: JamesIves/[email protected]
with:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: doc/build/html/