Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
empyre
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dieter Weber
empyre
Commits
37274538
Commit
37274538
authored
5 years ago
by
Jan Caron
Browse files
Options
Downloads
Patches
Plain Diff
Changes to .gitlab-ci.yml
parent
338d4544
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+36
-82
36 additions, 82 deletions
.gitlab-ci.yml
with
36 additions
and
82 deletions
.gitlab-ci.yml
+
36
−
82
View file @
37274538
stages
:
-
test
before_script
:
# Create SSH configuration directory if necessary (also parents with -p, mode: read/write/exec):
-
mkdir -p --mode=700 ~/.ssh/
# Add SSH key for jutil:
-
echo "$ID_RSA_JUTIL_PRIVATE" > ~/.ssh/id_rsa_jutil
# Configure SSH to use ~/.ssh/id_rsa_jutil for jugit.fz-juelich.de (-e allows \n):
-
echo -e "Host jugit.fz-juelich.de\n\tIdentityFile ~/.ssh/id_rsa_jutil\n" > ~/.ssh/config
# Add jugit.fz-juelich.de to known_hosts (not the same key as Jutil!):
-
echo jugit.fz-juelich.de, 134.94.130.31 "$ID_RSA_JUTIL_PUBLIC" > ~/.ssh/known_hosts
# Provide read access to owner (octal value code: 400) to jutil key and known_hosts with chmod:
-
chmod 400 ~/.ssh/id_rsa_jutil
-
chmod 400 ~/.ssh/known_hosts
# Install necessary apps like git and mesa-utils (needed for GL):
# TODO: Check if this is still needed after removing mayavi!?
-
apt-get update
-
apt-get install -y curl bzip2 git mesa-utils
test_miniconda
:
stage
:
test
image
:
continuumio/miniconda3
script
:
# Install requirements for pyramid:
-
conda info --envs
-
conda env create -q
# -q: quiet/ no progressbar, because it spams the log!
-
conda info --envs
-
source activate pyramid
-
conda info --envs
-
conda uninstall mayavi vtk -y
# TODO: necessary, because mayavi does not play nice with qt5!
-
conda install pyqt=5
# TODO: This is needed for tests to run, but breaks mayavi (not used)!
# Install jutil via secure ssh connection:
-
pip install git+ssh://gitlab@iffgit.fz-juelich.de/unger/jutil.git
# Execute tests:
-
python setup.py test
# Create coverage report:
-
coverage html
artifacts
:
paths
:
-
htmlcov/
# Install jutil via deploy token access:
-
pip install git+https://pyramid:"$JUTIL_DEPLOY_TOKEN"@jugit.fz-juelich.de/j.ungermann/jutil.git
test_conda_ubuntu
:
stage
:
test
image
:
ubuntu:16.04
script
:
# Install miniconda:
-
curl -O -L https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
-
chmod +x Miniconda3-latest-Linux-x86_64.sh
-
./Miniconda3-latest-Linux-x86_64.sh -b -p /opt/miniconda3
-
export PATH="/opt/miniconda3/bin:${PATH}"
# Install requirements for pyramid:
-
conda info --envs
-
conda env create -q
# -q: quiet/ no progressbar, because it spams the log!
-
conda info --envs
-
source activate pyramid
-
conda info --envs
-
conda uninstall mayavi vtk -y
# TODO: necessary, because mayavi does not play nice with qt5!
-
conda install pyqt=5
# TODO: This is needed for tests to run, but breaks mayavi (not used)!
# Install jutil via secure ssh connection:
-
pip install git+ssh://gitlab@iffgit.fz-juelich.de/unger/jutil.git
# Execute tests:
-
python setup.py test
stages
:
-
test
-
deploy
# TODO: add stage later, upload docs, coverage and such, shift artifacts here?
test_pip_minimal
:
stage
:
test
image
:
python:3.6
script
:
# TODO: Different jobs with custom develop arguments? extra_requires (hyperspy, plotting)?
# TODO: Use pip install -e .[hyperspy], etc.
# Install requirements:
-
pip install -e .['tests']
# TODO: other case with ['all']? After getting rid of mayavi...
# Install jutil via secure ssh connection:
-
pip install git+ssh://gitlab@iffgit.fz-juelich.de/unger/jutil.git
# Execute tests:
-
python setup.py test
test_style
:
image
:
continuumio/miniconda3:latest
stage
:
test
script
:
# -m: only run tests marked with "flake8"
-
python setup.py test --addopts "--flake8 -m flake8"
test_
pip_requirements
:
st
age
:
test
im
age
:
python:3.6
script
:
# Install requirement
s:
-
pip install -r requirements.txt
# TODO: mayavi/pyfftw commented out by hand to make work!
# Install jutil via secure ssh connection:
-
pip install git+ssh://gitlab@iffgit.fz-juelich.de/unger/jutil.git
# Execute tests:
-
python setup.py test
test_
function
:
im
age
:
continuumio/miniconda3:la
test
st
age
:
test
artifacts
:
path
s
:
-
.coverage
expire_in
:
1 week
script
:
# Execute
all
tests
and also check coverage with --cov
:
-
python setup.py test
--addopts "--cov"
# TODO: What about windows? Better have one test (miniconda?) for windows/max/linux, each!
# TODO: Or use Dockers? What's the difference
# TODO: Instead of environment.yml (for development) use setup.py requirements for end user!
test_docs
:
image
:
continuumio/miniconda3:latest
stage
:
test
script
:
# -f: Force overwriting of any existing generated files.
# -e: Put documentation for each module on its own page.
# -o: Directory to place the output files. If it does not exist, it is created.
# last parameter: module path
-
sphinx-apidoc -f -e -o docs/api pyramid
# Build the documentation from 'docs' and put into 'build/sphinx':
-
sphinx-build docs build/sphinx
artifacts
:
paths
:
-
build/sphinx
expire_in
:
1 week
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment