Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mpsd-software-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MPSD Computational Science
mpsd-software-manager
Commits
7b5f1339
Commit
7b5f1339
authored
1 year ago
by
Hans Fangohr
Browse files
Options
Downloads
Patches
Plain Diff
Execute tests on CI system
parent
d5465c9d
No related branches found
No related tags found
2 merge requests
!19
Move linux-debian11 into main
,
!4
Execute tests on CI system
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+68
-20
68 additions, 20 deletions
.gitlab-ci.yml
with
68 additions
and
20 deletions
.gitlab-ci.yml
+
68
−
20
View file @
7b5f1339
...
...
@@ -3,47 +3,95 @@ image: python:latest
stages
:
-
test
before_script
:
# prepare set up of latest python image to run style checks
.prepare_style
:
&prepare_style
-
cat /etc/issue
-
python -V
-
which python
-
python -m venv ../venv
-
python
3
-V
-
which python
3
-
python
3
-m venv ../venv
-
source ../venv/bin/activate
-
which python
-
which python
3
-
pwd
-
ls -l
-
pip install -U pip
-
pip --version
-
pip install pytest black ruff
-
pytest --version
-
cat /etc/issue
# prepare set up of Debian system to run py.test
.prepare_debian
:
&prepare_debian
-
echo "Execute this command before any 'script:' commands."
-
cat /etc/issue
-
pwd
-
ls -l
-
echo "Install Python3"
-
apt-get update
-
apt-get install -y python3 python3-venv
-
python3 -m venv --help
-
python3 -m venv venv
-
source venv/bin/activate
-
which python3
-
python3 --version
-
echo "Install Python dependencies for running the tests"
-
pip install -U pip
-
pip --version
-
pip install pytest black ruff archspec
-
echo "Diagnostics - which versions are we using"
-
python3 --version
-
pytest --version
-
black --version
-
ruff --version
-
echo "Install additional packages we need to run spack-setup.sh"
-
apt-get install -y git rsync
-
echo "Install additional packages we need to run spack"
# Taken from https://github.com/fangohr/oommf-in-spack/blob/main/Dockerfile
-
apt-get install -y --no-install-recommends
autoconf
build-essential
ca-certificates
coreutils
curl
environment-modules
file
gfortran
git
openssh-server
unzip
-
export MPSD_MICROARCH=$(archspec cpu)
-
echo "Setting MPSD_MICROARCH variable to $MPSD_MICROARCH"
-
echo "Which version of Debian are we running?"
-
cat /etc/issue
style
:
stage
:
test
image
:
python:latest
script
:
-
*prepare_style
-
black --version
-
ruff --version
-
ruff .
-
black --check --diff .
test
3-09
:
test
-bullseye
:
stage
:
test
image
:
python:3.9
image
:
debian:bullseye-slim
script
:
-
echo "run tests here later"
-
pyt
hon --version
-
*prepare_debian
-
pyt
est -v -l tests.py
test
3-10
:
test
-bookworm
:
stage
:
test
image
:
python:3.10
image
:
debian:bookworm-slim
script
:
-
echo "run tests here later"
-
python --version
-
*prepare_debian
-
pytest -v -l tests.py
test3-11
:
stage
:
test
image
:
python:3.11
script
:
-
echo "run tests here later"
-
python --version
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