Skip to content
Snippets Groups Projects
Commit 809f379c authored by Bruce Flynn's avatar Bruce Flynn
Browse files

ci tweaks

parent 62057cb6
No related branches found
No related tags found
No related merge requests found
build
dist
*.egg-info
.eggs
.pytest_cache
./tests/fixtures/*
./tests/__pycache__
test-py2:
stage: test
tags: ["docker", "shell"]
script:
- ./tests/run_ci.sh 2
- ./tests/run_tests.sh 2
test-py3:
stage: test
tags: ["docker", "shell"]
script:
- ./tests/run_ci.sh 3
- ./tests/run_tests.sh 3
sdist:
stage: deploy
......
FROM debian:bullseye-slim
ARG pytag="3"
# Install basic system/python requirements
RUN apt-get -qq update && apt-get -qq install \
gcc \
git \
python${pytag}-dev \
python${pytag}-minimal \
python${pytag}-pip \
python${pytag}-setuptools && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
# Install basic system/python requirements
RUN apt-get -qq update && apt-get -qq install \
postgresql-client && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
ENV PIP_TRUSTED_HOST "iweb1.sips"
ENV PIP_NO_CACHE_DIR "false"
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
WORKDIR /code
COPY . .
RUN pip${pytag} install -i https://iweb1.sips/eggs --trusted-host=iweb1.sips -e ".[testing]"
#!/usr/bin/env bash
ver=${1:-3}
docker run --rm -v $PWD:/code -w /code python:${ver} /code/tests/run.sh
#!/usr/bin/env bash
set -e
ver=$1
[[ ! "$ver" =~ (2|3) ]] && echo "Must provided 2 or 3 as python version" && exit 1
tag=$ver
if [[ $ver == 2 ]]; then
tag=""
fi
image=edosl0util${ver}
docker build -t ${image} -f tests/Dockerfile --build-arg=pytag=${tag} .
docker run \
-e PYTHONDONTWRITEBYTECODE=1 \
-e HOME=/code \
-v $PWD:/code \
-u $(id -u):$(id -g) \
-w /code \
${image} \
py.test -xv
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