Skip to content
Snippets Groups Projects
Commit eac1fb3a authored by Edward Fauchon-Jones's avatar Edward Fauchon-Jones
Browse files

Up CI to use pre-built docker test environment

`galadirith/lvcnrpy:v1.0.0` already has all test dependencies to
dramatically reduce test suite run time on Gitlab CI.
parent ac8a2f33
No related branches found
No related tags found
1 merge request!3Validate strain modes #2
Pipeline #
# Setup Python test environment with cache as Duncan does
cache:
paths:
- apt-cache/
- pip-cache/
image: galadirith/lvcnrpy:v1.0.0
# Setup Python test environment
# Setup `lvcnrpy` test environment
before_script:
# Configure apt-get
- export APT_CACHE_DIR=`pwd`/apt-cache
- export PIP_CACHE_DIR=`pwd`/pip-cache
- mkdir -pv $APT_CACHE_DIR $PIP_CACHE_DIR
# Trust maintainer of lscsoft-archive-keyring package
- gpg --keyserver keys.gnupg.net --recv-keys CE050D236DB6FA3F
- gpg -a --export CE050D236DB6FA3F | apt-key add -
# tdd LSCSoft Debian Jessie archive
- echo deb http://software.ligo.org/lscsoft/debian jessie contrib >> /etc/apt/sources.list
- apt-get -o Dir::Cache::Archives="$APT_CACHE_DIR" -yqq update
- apt-get -o Dir::Cache::Archives="$APT_CACHE_DIR" -yqq install lscsoft-archive-keyring
- apt-get -o Dir::Cache::Archives="$APT_CACHE_DIR" -yqq update
# Install packages to setup Python test environment
- >
apt-get -o Dir::Cache::Archives="$APT_CACHE_DIR" -yqq install
wget
pkg-config
python
python-dev
python-pip
python-numpy
python-scipy
python-matplotlib
python-h5py
python-pytest
# Define LVCNR_DATADIR (only needs to exist, not used for tests)
- export LVCNR_DATADIR=`pwd`/lvc_nr
- mkdir -pv $LVCNR_DATADIR
# Install local `lvcnrpy` using pip
- pip install --download-cache="$PIP_CACHE_DIR" .
- pip install .
# Run `lvcnrpy` tests
test:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment