Skip to content

Commit c711a04

Browse files
authored
Merge pull request #36 from effigies/git-wf-actions
Use conda environments in CI to work with git-annex
2 parents a392eeb + 156996d commit c711a04

File tree

5 files changed

+49
-37
lines changed

5 files changed

+49
-37
lines changed

.github/workflows/gh-pages.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,27 @@ on:
44
push: {branches: [main, master]}
55
pull_request: {branches: [main, master]}
66

7+
defaults:
8+
run:
9+
shell: bash -l {0}
10+
711
jobs:
812
build:
913
runs-on: ubuntu-latest
10-
strategy:
11-
matrix:
12-
python: [3.9]
1314
steps:
1415
- uses: actions/checkout@v3
15-
- name: Set up Python ${{ matrix.python }}
16-
uses: actions/setup-python@v3
17-
with:
18-
python-version: ${{ matrix.python }}
19-
- name: Install dependencies
20-
run: |
21-
pip install --upgrade pip
22-
pip install -r jupyterbook/requirements.txt
2316
- name: Disable etelemetry
2417
run: echo "NO_ET=TRUE" >> $GITHUB_ENV
18+
- name: Active conda env pydra-tutorial
19+
uses: conda-incubator/setup-miniconda@v2
20+
with:
21+
activate-environment: pydra-tutorial
22+
environment-file: environment.yml
23+
- run: conda info
24+
- run: conda list
25+
- run: conda config --show
26+
- name: Install dependencies
27+
run: pip install jupyter-book
2528
- name: Build JupyterBook
2629
run: jb build -W jupyterbook
2730
- uses: peaceiris/actions-gh-pages@v3

.github/workflows/notebooks.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push, pull_request]
44

55
defaults:
66
run:
7-
shell: bash
7+
shell: bash -l {0}
88

99
jobs:
1010
build:
@@ -16,15 +16,18 @@ jobs:
1616
runs-on: ${{ matrix.os }}
1717

1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
2020
- name: Disable etelemetry
21-
run: echo "NO_ET=TRUE" >> $GITHUB_ENV
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v2
21+
run: echo "NO_ET=TRUE" >> $GITHUB_ENV
22+
- name: Active conda env pydra-tutorial
23+
uses: conda-incubator/setup-miniconda@v2
2424
with:
25+
activate-environment: pydra-tutorial
26+
environment-file: environment.yml
2527
python-version: ${{ matrix.python-version }}
26-
- name: Install requirements
27-
run: python -m pip install -r requirements.txt
28+
- run: conda info
29+
- run: conda list
30+
- run: conda config --show
2831
- name: Convert all md files to ipynb
2932
run: jupytext notebooks/*.md --to ipynb
3033
- name: Test notebooks with pytest

environment.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: pydra-tutorial
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- git-annex
7+
- pip
8+
- pip:
9+
- datalad
10+
- pydra
11+
- jupyter
12+
- jupyter_contrib_nbextensions
13+
- jupytext
14+
- jupyterlab
15+
- matplotlib
16+
- nbformat
17+
- nbval
18+
- nest_asyncio
19+
- psutil
20+
- pytest
21+
- numpy
22+
- pandas
23+
- scipy
24+
- nibabel
25+
- nilearn

jupyterbook/requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

requirements.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)