-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run tests with pytest
- Loading branch information
Showing
2 changed files
with
32 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM docker.openmodelica.org/build-deps:v1.16.2 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -qy gnupg wget ca-certificates apt-transport-https sudo \ | ||
&& echo "deb https://build.openmodelica.org/omc/builds/linux/releases/1.14.2/ `lsb_release -sc` release" > /etc/apt/sources.list.d/openmodelica.list \ | ||
&& wget https://build.openmodelica.org/apt/openmodelica.asc -O- | apt-key add - \ | ||
&& apt-get update \ | ||
&& apt-get install -qy --no-install-recommends omc omlib-modelica-3.2.2 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
RUN pip3 install --no-cache pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
pipeline { | ||
agent any | ||
agent none | ||
stages { | ||
stage('') { | ||
agent { | ||
node { | ||
label 'linux' | ||
stage('test') { | ||
parallel { | ||
stage('python3') { | ||
agent { | ||
dockerfile { | ||
// Large image with full OpenModelica build dependencies; lacks omc and OMPython | ||
label 'linux' | ||
dir '.jenkins/python3' | ||
additionalBuildArgs '--pull' | ||
} | ||
} | ||
steps { | ||
sh 'hostname' | ||
sh 'HOME="$PWD" python3 setup.py install --user' | ||
sh ''' | ||
export HOME="$PWD" | ||
pytest -v --junit-xml=py3.xml testing | ||
''' | ||
junit 'py3.xml' | ||
} | ||
} | ||
|
||
} | ||
steps { | ||
sh 'hostname' | ||
} | ||
} | ||
|
||
} | ||
} | ||
} |