Bump versions of required linters
This commit is contained in:
parent
80d8949850
commit
c8d516c67d
6 changed files with 35 additions and 26 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -13,4 +13,4 @@ jobs:
|
||||||
run: >-
|
run: >-
|
||||||
docker run -t --rm
|
docker run -t --rm
|
||||||
-v "$PWD:/yadm:ro"
|
-v "$PWD:/yadm:ro"
|
||||||
yadm/testbed:2020-07-08
|
yadm/testbed:2020-12-21
|
||||||
|
|
14
Makefile
14
Makefile
|
@ -1,5 +1,5 @@
|
||||||
PYTESTS = $(wildcard test/test_*.py)
|
PYTESTS = $(wildcard test/test_*.py)
|
||||||
IMAGE = yadm/testbed:2020-07-08
|
IMAGE = yadm/testbed:2020-12-21
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all:
|
all:
|
||||||
|
@ -146,16 +146,16 @@ testenv:
|
||||||
@echo
|
@echo
|
||||||
python3 -m venv --clear testenv
|
python3 -m venv --clear testenv
|
||||||
testenv/bin/pip3 install --upgrade pip setuptools
|
testenv/bin/pip3 install --upgrade pip setuptools
|
||||||
testenv/bin/pip3 install --upgrade \
|
testenv/bin/pip3 install --upgrade -r test/requirements.txt;
|
||||||
flake8==3.7.8 \
|
|
||||||
pylint==2.4.1 \
|
|
||||||
pytest==5.1.3 \
|
|
||||||
yamllint==1.17.0 \
|
|
||||||
;
|
|
||||||
@echo
|
@echo
|
||||||
@echo 'To activate this test environment type:'
|
@echo 'To activate this test environment type:'
|
||||||
@echo ' source testenv/bin/activate'
|
@echo ' source testenv/bin/activate'
|
||||||
|
|
||||||
|
.PHONY: image
|
||||||
|
image:
|
||||||
|
@docker build -f test/Dockerfile . -t "$(IMAGE)"
|
||||||
|
|
||||||
|
|
||||||
.PHONY: man
|
.PHONY: man
|
||||||
man:
|
man:
|
||||||
@groff -man -Tascii ./yadm.1 | less
|
@groff -man -Tascii ./yadm.1 | less
|
||||||
|
|
|
@ -4,4 +4,4 @@ services:
|
||||||
testbed:
|
testbed:
|
||||||
volumes:
|
volumes:
|
||||||
- .:/yadm:ro
|
- .:/yadm:ro
|
||||||
image: yadm/testbed:2020-07-08
|
image: yadm/testbed:2020-12-21
|
||||||
|
|
|
@ -12,6 +12,9 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
|
||||||
# Convenience settings for the testbed's root account
|
# Convenience settings for the testbed's root account
|
||||||
RUN echo 'set -o vi' >> /root/.bashrc
|
RUN echo 'set -o vi' >> /root/.bashrc
|
||||||
|
|
||||||
|
# Create a flag to identify when running inside the yadm testbed
|
||||||
|
RUN touch /.yadmtestbed
|
||||||
|
|
||||||
# Install prerequisites
|
# Install prerequisites
|
||||||
RUN \
|
RUN \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
|
@ -24,25 +27,25 @@ RUN \
|
||||||
make \
|
make \
|
||||||
man \
|
man \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
shellcheck=0.4.6-1 \
|
|
||||||
vim \
|
vim \
|
||||||
;
|
&& rm -rf /var/lib/apt/lists/*;
|
||||||
RUN pip3 install \
|
|
||||||
envtpl \
|
ARG SC_VER=0.7.1
|
||||||
j2cli \
|
RUN \
|
||||||
flake8==3.7.8 \
|
curl -fLo - \
|
||||||
pylint==2.4.1 \
|
https://github.com/koalaman/shellcheck/releases/download/v$SC_VER/shellcheck-v$SC_VER.linux.x86_64.tar.xz | \
|
||||||
pytest==5.1.3 \
|
tar -xJv && \
|
||||||
yamllint==1.17.0 \
|
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 \
|
RUN \
|
||||||
curl https://raw.githubusercontent.com/jirutka/esh/v0.3.0/esh > /usr/local/bin/esh && \
|
curl https://raw.githubusercontent.com/jirutka/esh/v0.3.0/esh > /usr/local/bin/esh && \
|
||||||
chmod +x /usr/local/bin/esh
|
chmod +x /usr/local/bin/esh
|
||||||
|
|
||||||
# Create a flag to identify when running inside the yadm testbed
|
|
||||||
RUN touch /.yadmtestbed
|
|
||||||
|
|
||||||
# /yadm will be the work directory for all tests
|
# /yadm will be the work directory for all tests
|
||||||
# docker commands should mount the local yadm project as /yadm
|
# docker commands should mount the local yadm project as /yadm
|
||||||
WORKDIR /yadm
|
WORKDIR /yadm
|
|
@ -25,25 +25,25 @@ def pytest_addoption(parser):
|
||||||
@pytest.fixture(scope='session')
|
@pytest.fixture(scope='session')
|
||||||
def shellcheck_version():
|
def shellcheck_version():
|
||||||
"""Version of shellcheck supported"""
|
"""Version of shellcheck supported"""
|
||||||
return '0.4.6'
|
return '0.7.1'
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='session')
|
@pytest.fixture(scope='session')
|
||||||
def pylint_version():
|
def pylint_version():
|
||||||
"""Version of pylint supported"""
|
"""Version of pylint supported"""
|
||||||
return '2.4.1'
|
return '2.6.0'
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='session')
|
@pytest.fixture(scope='session')
|
||||||
def flake8_version():
|
def flake8_version():
|
||||||
"""Version of flake8 supported"""
|
"""Version of flake8 supported"""
|
||||||
return '3.7.8'
|
return '3.8.4'
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='session')
|
@pytest.fixture(scope='session')
|
||||||
def yamllint_version():
|
def yamllint_version():
|
||||||
"""Version of yamllint supported"""
|
"""Version of yamllint supported"""
|
||||||
return '1.17.0'
|
return '1.25.0'
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='session')
|
@pytest.fixture(scope='session')
|
||||||
|
|
6
test/requirements.txt
Normal file
6
test/requirements.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
envtpl
|
||||||
|
flake8==3.8.4
|
||||||
|
j2cli
|
||||||
|
pylint==2.6.0
|
||||||
|
pytest==6.1.2
|
||||||
|
yamllint==1.25.0
|
Loading…
Reference in a new issue