Skip to content
Snippets Groups Projects
Commit 3b0b3239 authored by Hans Fangohr's avatar Hans Fangohr
Browse files

Merge branch 'run-tests-on-ci-system' into 'linux-debian11'

Execute tests on CI system

See merge request mpsd-cs/mpsd-software-environments!4
parents d5465c9d 7b5f1339
No related branches found
No related tags found
2 merge requests!19Move linux-debian11 into main,!4Execute tests on CI system
Pipeline #367790 passed
...@@ -3,47 +3,95 @@ image: python:latest ...@@ -3,47 +3,95 @@ image: python:latest
stages: stages:
- test - test
before_script: # prepare set up of latest python image to run style checks
.prepare_style: &prepare_style
- cat /etc/issue - cat /etc/issue
- python -V - python3 -V
- which python - which python3
- python -m venv ../venv - python3 -m venv ../venv
- source ../venv/bin/activate - source ../venv/bin/activate
- which python - which python3
- pwd - pwd
- ls -l
- pip install -U pip - pip install -U pip
- pip --version - pip --version
- pip install pytest black ruff - pip install pytest black ruff
- pytest --version - 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: style:
stage: test stage: test
image: python:latest image: python:latest
script: script:
- *prepare_style
- black --version - black --version
- ruff --version - ruff --version
- ruff . - ruff .
- black --check --diff . - black --check --diff .
test3-09: test-bullseye:
stage: test stage: test
image: python:3.9 image: debian:bullseye-slim
script: script:
- echo "run tests here later" - *prepare_debian
- python --version - pytest -v -l tests.py
test3-10: test-bookworm:
stage: test stage: test
image: python:3.10 image: debian:bookworm-slim
script: script:
- echo "run tests here later" - *prepare_debian
- python --version - pytest -v -l tests.py
test3-11:
stage: test
image: python:3.11
script:
- echo "run tests here later"
- python --version
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment