-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy path.gitlab-ci.yml
44 lines (42 loc) · 1.34 KB
/
.gitlab-ci.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
python_2_7_tests:
script:
- apt-get update -qy
- apt-get install -qy python-pip python-numpy python-scipy pyflakes libhdf5-dev libnetcdf-dev cython
- pip install --upgrade setuptools
- pip install --user netCDF4
- pwd
- echo $HOME
- cd ..
- echo $PWD
# using 'install from source' instructions
- export PATH=$PATH:$CI_PROJECT_DIR/bin
- echo $PATH
- export PYTHONPATH=$CI_PROJECT_DIR
- echo $PYTHONPATH
# tests
- python --version
- ase info
- ase test
# pyflakes code check
- cd $CI_PROJECT_DIR
- PYTHONPATH=$PWD python ase/test/__init__.py
python_3_tests:
script:
- apt-get update -qy
- apt-get install -qy python3-pip python3-numpy python3-scipy pyflakes gettext libhdf5-dev libnetcdf-dev cython3
- pip3 install --upgrade setuptools
- pip3 install --user netCDF4
# install ase into current python environment to ensure
# any shebang lines in scripts point to python3
- pip3 install --user .
# script path when installing with --user
- export PATH=$HOME/.local/bin:$PATH
# Running from a temporary directory to avoid import errors
- mkdir -p /tmp/test/ && cd /tmp/test && echo $PWD
# Run tests
- python3 --version
- ase info
- ase test -v
# pyflakes code check
- cd $CI_PROJECT_DIR
- python3 ase/test/__init__.py