Switch to read-only container filesystem to avoid *.pyc getting created with busted permissions.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Dan Helfman 2019-12-11 21:24:37 -08:00
parent 78aa4626fa
commit c6cb21a748
4 changed files with 12 additions and 8 deletions

View File

@ -10,4 +10,5 @@
set -e set -e
docker-compose --file tests/end-to-end/docker-compose.yaml up --abort-on-container-exit docker-compose --file tests/end-to-end/docker-compose.yaml up --force-recreate \
--abort-on-container-exit

View File

@ -11,7 +11,8 @@
set -e set -e
python -m pip install --upgrade pip==19.3.1 python -m pip install --upgrade pip==19.3.1
pip install tox==3.14.0 pip install tox==3.14.1
tox export COVERAGE_FILE=/tmp/.coverage
tox --workdir /tmp/.tox
apk add --no-cache borgbackup postgresql-client mariadb-client apk add --no-cache borgbackup postgresql-client mariadb-client
tox --workdir /tmp -e end-to-end tox --workdir /tmp/.tox -e end-to-end

View File

@ -13,7 +13,9 @@ services:
tests: tests:
image: python:3.7-alpine3.10 image: python:3.7-alpine3.10
volumes: volumes:
- "../..:/app" - "../..:/app:ro"
tmpfs:
- "/app/borgmatic.egg-info"
tty: true tty: true
working_dir: /app working_dir: /app
command: command:

View File

@ -2,7 +2,7 @@
envlist = py35,py36,py37,py38 envlist = py35,py36,py37,py38
skip_missing_interpreters = True skip_missing_interpreters = True
skipsdist = True skipsdist = True
minversion = 3.14.0 minversion = 3.14.1
[testenv] [testenv]
usedevelop = True usedevelop = True
@ -10,8 +10,7 @@ deps = -rtest_requirements.txt
whitelist_externals = whitelist_externals =
find find
sh sh
commands_pre = passenv = COVERAGE_FILE
find {envdir} -type f -not -path '*/__pycache__/*' -name '*.py[c|o]' -delete
commands = commands =
pytest {posargs} pytest {posargs}
py36,py37,py38: black --check . py36,py37,py38: black --check .
@ -28,6 +27,7 @@ commands =
[testenv:end-to-end] [testenv:end-to-end]
deps = -rtest_requirements.txt deps = -rtest_requirements.txt
passenv = COVERAGE_FILE
commands = commands =
pytest {posargs} --no-cov tests/end-to-end pytest {posargs} --no-cov tests/end-to-end