1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2026-03-02 03:49:29 +00:00

Bump versions of required linters

This commit is contained in:
Tim Byrne
2020-12-21 15:30:28 -06:00
parent 80d8949850
commit c8d516c67d
6 changed files with 35 additions and 26 deletions

57
test/Dockerfile Normal file
View File

@@ -0,0 +1,57 @@
FROM ubuntu:18.04
MAINTAINER Tim Byrne <sultan@locehilios.com>
# No input during build
ENV DEBIAN_FRONTEND noninteractive
# UTF8 locale
RUN apt-get update && apt-get install -y locales
RUN locale-gen en_US.UTF-8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
# Convenience settings for the testbed's root account
RUN echo 'set -o vi' >> /root/.bashrc
# Create a flag to identify when running inside the yadm testbed
RUN touch /.yadmtestbed
# Install prerequisites
RUN \
apt-get update && \
apt-get install -y \
curl \
expect \
git \
gnupg \
lsb-release \
make \
man \
python3-pip \
vim \
&& rm -rf /var/lib/apt/lists/*;
ARG SC_VER=0.7.1
RUN \
curl -fLo - \
https://github.com/koalaman/shellcheck/releases/download/v$SC_VER/shellcheck-v$SC_VER.linux.x86_64.tar.xz | \
tar -xJv && \
mv shellcheck-v$SC_VER/shellcheck /usr/bin && \
rm -rf shellcheck-v$SC_VER
COPY test/requirements.txt /tmp/requirements.txt
RUN pip3 install --upgrade pip setuptools
RUN pip3 install --upgrade -r /tmp/requirements.txt
RUN \
curl https://raw.githubusercontent.com/jirutka/esh/v0.3.0/esh > /usr/local/bin/esh && \
chmod +x /usr/local/bin/esh
# /yadm will be the work directory for all tests
# docker commands should mount the local yadm project as /yadm
WORKDIR /yadm
# Create a Makefile to be used if no /yadm volume is mounted
RUN echo "test:\n\t@echo 'The yadm project must be mounted at /yadm'\n\t@echo 'Try using a docker parameter like -v \"\$\$PWD:/yadm:ro\"'\n\t@false" > /yadm/Makefile
# By default, run all tests defined
CMD make test

View File

@@ -25,25 +25,25 @@ def pytest_addoption(parser):
@pytest.fixture(scope='session')
def shellcheck_version():
"""Version of shellcheck supported"""
return '0.4.6'
return '0.7.1'
@pytest.fixture(scope='session')
def pylint_version():
"""Version of pylint supported"""
return '2.4.1'
return '2.6.0'
@pytest.fixture(scope='session')
def flake8_version():
"""Version of flake8 supported"""
return '3.7.8'
return '3.8.4'
@pytest.fixture(scope='session')
def yamllint_version():
"""Version of yamllint supported"""
return '1.17.0'
return '1.25.0'
@pytest.fixture(scope='session')

6
test/requirements.txt Normal file
View File

@@ -0,0 +1,6 @@
envtpl
flake8==3.8.4
j2cli
pylint==2.6.0
pytest==6.1.2
yamllint==1.25.0