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

Execute tests on CI system

parent d5465c9d
No related branches found
No related tags found
2 merge requests!19Move linux-debian11 into main,!4Execute tests on CI system
......@@ -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
- python3 -V
- which python3
- python3 -m venv ../venv
- source ../venv/bin/activate
- which python
- which python3
- 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 .
test3-09:
test-bullseye:
stage: test
image: python:3.9
image: debian:bullseye-slim
script:
- echo "run tests here later"
- python --version
- *prepare_debian
- pytest -v -l tests.py
test3-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
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