Skip to content

Commit

Permalink
Add Alpine test environment to tox (joke2k#1337)
Browse files Browse the repository at this point in the history
* Add testenv py39 and alpine. Remove py35

* Add TEST_ALPINE environment variable to .travis.yml

* Update README.rst
  • Loading branch information
bact authored and IlfirinPL committed Apr 9, 2021
1 parent c409ac8 commit bfcae09
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
env: TOXENV=pypy3
- python: 3.7
env: TOXENV=32bit TEST_32BIT=1
- python: 3.7
env: TOXENV=alpine TEST_ALPINE=1

install:
- pip install tox
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ global-exclude *.py[cod] __pycache__ *.so
exclude Makefile tox.ini .coveragerc .bumpversion.cfg .dockerignore .isort.cfg
exclude ISSUE_TEMPLATE.md PULL_REQUEST_TEMPLATE.md
exclude appveyor.yml readthedocs.yml
exclude build-alpine.sh
exclude build32bit.sh
prune docs
prune .circleci
15 changes: 15 additions & 0 deletions build-alpine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

if [[ -z "${TEST_ALPINE}" ]]; then
echo "Not on Travis"
exit 0
fi

docker run -v ${PWD}:/code -e INSTALL_REQUIREMENTS=${INSTALL_REQUIREMENTS} python:3-alpine sh -c "
apk update \
&& apk add git \
&& pip install tox coveralls \
&& export LANG='en_US.UTF-8' \
&& cd /code \
&& tox -e py\
&& coverage report"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries :: Python Modules',
Expand All @@ -62,7 +62,7 @@
packages=find_packages(exclude=excluded_packages),
platforms=["any"],
zip_safe=zip_safe,
python_requires=">=3.5",
python_requires=">=3.6",
install_requires=[
"python-dateutil>=2.4",
"text-unidecode==1.3",
Expand Down
13 changes: 9 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[tox]
envlist=py{35,36,37,38,py3},32bit,flake8,checkmanifest,isort
envlist=py{36,37,38,39,py3},32bit,alpine,flake8,checkmanifest,isort
skip_missing_interpreters = true

[testenv]
deps =
coverage
coverage>=5.2
freezegun<0.4
pytest>=6.0.1
random2
random2>=1.0.1
ukpostcodeparser>=1.1.1
validators>=0.13.0
sphinx>=2.4,<3.0
Expand Down Expand Up @@ -43,6 +43,11 @@ basepython = python
passenv = TEST_32BIT
commands = ./build32bit.sh

[testenv:alpine]
basepython = python
passenv = TEST_ALPINE
commands = ./build-alpine.sh

[flake8]
max-line-length = 120

Expand All @@ -51,4 +56,4 @@ ignore =
faker/sphinx
faker/sphinx/*
tests/sphinx
tests/sphinx/*
tests/sphinx/*

0 comments on commit bfcae09

Please sign in to comment.