-
Notifications
You must be signed in to change notification settings - Fork 10
67 lines (55 loc) · 2.24 KB
/
python-package-conda.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
name: Run Test Suite
on: [pull_request, workflow_dispatch]
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v2
# Necessary to prevent permission issues with tar when unpacking the cache
# into the /usr/share/miniconda/ directory
- name: Set cached directory permissions
run: |
sudo chown -R $(whoami):$(id -ng) /usr/share/miniconda/
# Modified from:
# https://github.com/marketplace/actions/setup-miniconda#caching
- name: Set or unpack cached conda packages
uses: actions/cache@v2
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: /usr/share/miniconda
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('environment.yml') }}-${{
hashFiles('environment-synthetic-data.yml') }}
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the
# miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install bids-validator for test suite
run: |
sudo npm install -g [email protected]
- name: Install conda environment
run: |
conda install -y -c defaults -c conda-forge awscli bcrypt boto3 dcm2niix flake8 indexed_gzip jupyter mypy nibabel nilearn nodejs pip pydicom pytest python=3.8 requests rpyc scipy toml tornado websocket-client
pip install inotify pybids watchdog wsaccel
# conda list
# conda env update --file environment.yml --name base
# conda env update --file environment-synthetic-data.yml --name base
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=80 --statistics
- name: Setup certificates directory for running tests
run: |
mkdir certs
openssl genrsa -out certs/rtcloud_private.key 2048
bash scripts/make-sslcert.sh -ip `hostname -i`
# - name: Test with pytest
# run: |
# python -m pytest tests/