forked from ReproNim/neurodocker
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (48 loc) · 1.55 KB
/
pull-request.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
run-tests:
runs-on: ubuntu-18.04
strategy:
matrix:
python-version: ['3.10', '3.9', '3.8', '3.7']
steps:
- name: Install Singularity
run: |
sudo apt-get update
sudo apt-get install --yes \
libssl-dev \
uuid-dev \
libgpgme11-dev \
squashfs-tools
curl -fsSL https://github.com/hpcng/singularity/releases/download/v3.6.4/singularity-3.6.4.tar.gz | tar xz
cd singularity
./mconfig -p $HOME/opt/singularity
cd builddir
make
sudo make install
- name: Set Singularity environment variables
run: |
echo $HOME/opt/singularity/bin >> $GITHUB_PATH
# Give reproenv the full path to singularity, so it still works with `sudo`.
echo REPROENV_SINGULARITY_PROGRAM=$HOME/opt/singularity/bin/singularity >> $GITHUB_ENV
echo SINGULARITY_CACHEDIR=/dev/shm/$(whoami)/singularity >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install neurodocker
run: python -m pip install --editable .[dev]
- name: Check types
run: mypy neurodocker
- name: Check style
run: flake8 neurodocker
- name: Run python tests
run: pytest --numprocesses auto
- name: Get code coverage
run: codecov