Skip to content

Commit af03647

Browse files
CI is added [flake8] (#2)
1 parent 4fcf934 commit af03647

File tree

4 files changed

+75
-1
lines changed

4 files changed

+75
-1
lines changed

.travis.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
os: linux
2+
3+
dist: bionic
4+
5+
language: python
6+
7+
services:
8+
- docker
9+
10+
install:
11+
- docker build --build-arg PYTHON_VERSION="${PYTHON_VERSION}" -t tests -f Dockerfile--${TEST_PLATFORM}.tmpl .
12+
13+
script:
14+
- docker run -t tests
15+
16+
notifications:
17+
email:
18+
on_success: change
19+
on_failure: always
20+
21+
env:
22+
- TEST_PLATFORM=alpine PYTHON_VERSION=3.7
23+
- TEST_PLATFORM=alpine PYTHON_VERSION=3.8
24+
- TEST_PLATFORM=alpine PYTHON_VERSION=3.9
25+
- TEST_PLATFORM=alpine PYTHON_VERSION=3.10
26+
- TEST_PLATFORM=alpine PYTHON_VERSION=3.11
27+
- TEST_PLATFORM=alpine PYTHON_VERSION=3.12
28+
- TEST_PLATFORM=alpine PYTHON_VERSION=3.13
29+
- TEST_PLATFORM=alpine PYTHON_VERSION=3.14
30+

Dockerfile--alpine.tmpl

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
ARG PYTHON_VERSION
2+
3+
# --------------------------------------------- base1
4+
FROM python:${PYTHON_VERSION}-alpine as base1
5+
6+
# --------------------------------------------- base1
7+
FROM base1 as base2
8+
9+
# --------------------------------------------- final
10+
FROM base2 as final
11+
12+
RUN apk add bash
13+
14+
RUN adduser -D test
15+
16+
ADD . /home/test/testgres
17+
RUN chown -R test /home/test/testgres
18+
WORKDIR /home/test/testgres
19+
20+
USER test
21+
22+
ENTRYPOINT sh -c " \
23+
set -eux; \
24+
echo HELLO FROM ENTRYPOINT; \
25+
echo HOME DIR IS [`realpath ~/`]; \
26+
bash run_tests3.sh;"

run_tests3.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
set -eux
4+
5+
# prepare python environment
6+
VENV_PATH="/tmp/testgres_venv"
7+
rm -rf $VENV_PATH
8+
python -m venv "${VENV_PATH}"
9+
export VIRTUAL_ENV_DISABLE_PROMPT=1
10+
source "${VENV_PATH}/bin/activate"
11+
12+
# install testgres' dependencies
13+
export PYTHONPATH=$(pwd)
14+
# $PIP install .
15+
16+
pip install flake8 flake8-pyproject
17+
flake8
18+
19+
set +eux

src/exceptions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ class TestgresException(Exception):
77

88
class InvalidOperationException(TestgresException):
99
pass
10-

0 commit comments

Comments
 (0)