Skip to content

Commit c5e2dee

Browse files
committed
🔧 Update CI images
Update test image and manifests
1 parent c705561 commit c5e2dee

19 files changed

+17796
-38478
lines changed
Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file should be pushed to danielflook/python-minifier-build
1+
# This file should be pushed to danielflook/python-minifier-build:fedora28-<date>
22
FROM fedora:28
33

44
# CircleCI required tools
@@ -8,21 +8,12 @@ RUN dnf install -y \
88
tar \
99
gzip \
1010
gpg \
11-
ca-certificates
11+
ca-certificates \
12+
&& dnf update -y
1213

1314
# Python versions
1415
RUN dnf install -y \
15-
python26 \
16-
python27 \
17-
python33 \
18-
python34 \
19-
python35 \
20-
python36 \
21-
python37 \
22-
pypy \
23-
pypy3 \
24-
python2-test \
25-
python3-test
16+
python33
2617

2718
WORKDIR /tmp/work
2819
ENTRYPOINT ["/bin/bash"]

.circleci/Dockerfile-fedora30

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This file should be pushed to danielflook/python-minifier-build:fedora30-<date>
2+
FROM fedora:30
3+
4+
# CircleCI required tools
5+
RUN dnf install -y \
6+
git \
7+
openssh \
8+
tar \
9+
gzip \
10+
gpg \
11+
ca-certificates \
12+
&& dnf update -y
13+
14+
# Python versions
15+
RUN dnf install -y \
16+
python26 \
17+
python27 \
18+
python34 \
19+
python35 \
20+
python36 \
21+
python37 \
22+
pypy \
23+
pypy3 \
24+
python2-test \
25+
python3-test
26+
27+
RUN dnf install -y \
28+
@development-tools \
29+
findutils \
30+
zlib-devel \
31+
bzip2-devel \
32+
ncurses-devel \
33+
gdbm-devel \
34+
openssl-devel \
35+
sqlite-devel \
36+
tk-devel \
37+
libuuid-devel \
38+
readline-devel \
39+
libnsl2-devel \
40+
xz-devel \
41+
libffi-devel \
42+
wget
43+
44+
RUN git clone https://github.com/python/cpython.git \
45+
&& cd cpython \
46+
&& git checkout 3.8 \
47+
&& ./configure \
48+
&& make \
49+
&& make altinstall \
50+
&& cd .. \
51+
&& rm -rf cpython
52+
53+
WORKDIR /tmp/work
54+
ENTRYPOINT ["/bin/bash"]

.circleci/build-images.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
DATE=$(date -I)
3+
docker build -t danielflook/python-minifier-build:fedora30-$DATE -f Dockerfile-fedora30 .
4+
docker build -t danielflook/python-minifier-build:fedora28-$DATE -f Dockerfile-fedora28 .

.circleci/config.yml

Lines changed: 129 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,90 @@
11
version: 2.1
22

3+
commands:
4+
set_package_version:
5+
description: Set version statically
6+
steps:
7+
- run:
8+
name: Set version statically
9+
command: |
10+
VERSION=$(python3 setup.py --version)
11+
sed -i "s/setup_requires=.*/version='$VERSION',/; s/use_scm_version=.*//" setup.py
12+
313
jobs:
14+
15+
test_python26:
16+
docker:
17+
- image: danielflook/python-minifier-build:fedora30-2019-06-26
18+
steps:
19+
- checkout
20+
- set_package_version
21+
22+
- run:
23+
name: tox
24+
command: |
25+
pip3 install 'tox<3' 'virtualenv<16'
26+
tox -r -e python26
27+
28+
test_python33:
29+
docker:
30+
- image: danielflook/python-minifier-build:fedora28-2019-06-26
31+
steps:
32+
- checkout
33+
- set_package_version
34+
35+
- run:
36+
name: tox
37+
command: |
38+
pip3 install 'tox<3' 'virtualenv<16'
39+
tox -r -e python33
40+
441
test:
542
docker:
6-
- image: danielflook/python-minifier-build:<< parameters.image >>
43+
- image: danielflook/python-minifier-build:fedora30-2019-06-26
744
steps:
845
- checkout
46+
- set_package_version
947

1048
- run:
11-
name: Set version statically
49+
name: tox
1250
command: |
13-
VERSION=$(python setup.py --version)
14-
sed -i "s/setup_requires=.*/version='$VERSION',/; s/use_scm_version=.*//" setup.py
51+
pip3 install tox==3.11.1 virtualenv==16.6.0
52+
tox -r -e python27,python34,python35,python36,python37,pypy,pypy3
53+
54+
xtest:
55+
docker:
56+
- image: danielflook/python-minifier-build:<< parameters.image >>-2019-06-26
57+
steps:
58+
- checkout
59+
- set_package_version
1560

1661
- run:
1762
name: tox
1863
command: |
19-
pip install tox virtualenv
20-
tox -r -e << parameters.python >>
64+
65+
if [[ "<< parameters.interpreter >>" == "python26" ]]; then
66+
pip3 install 'tox<3' 'virtualenv<16'
67+
elif [[ "<< parameters.interpreter >>" == "python33" ]]; then
68+
pip3 install 'tox<3' 'virtualenv<16'
69+
else
70+
pip3 install tox==3.11.1 virtualenv==16.6.0
71+
fi
72+
73+
tox -r -e << parameters.interpreter >> xtest
2174
2275
parameters:
23-
python:
76+
interpreter:
2477
type: string
2578
image:
2679
type: string
2780
default: fedora30
2881

2982
publish:
3083
docker:
31-
- image: danielflook/python-minifier-build
84+
- image: danielflook/python-minifier-build:fedora30-2019-06-26
3285
steps:
3386
- checkout
34-
35-
- run:
36-
name: Set version statically
37-
command: |
38-
VERSION=$(python setup.py --version)
39-
sed -i "s/setup_requires=.*/version='$VERSION',/; s/use_scm_version=.*//" setup.py
87+
- set_package_version
4088

4189
- run:
4290
name: Add signing key
@@ -59,36 +107,95 @@ jobs:
59107

60108
publish_docs:
61109
docker:
62-
- image: danielflook/python-minifier-build
110+
- image: danielflook/python-minifier-build:fedora30-2019-06-26
63111
steps:
64112
- checkout
65113

66114
- run:
67115
name: sphinx build
68116
command: |
69117
pip3 install --upgrade setuptools wheel twine
70-
pip3 install -r requirements-dev.txt
118+
pip3 install sphinx==2.0.1 sphinxcontrib-programoutput==0.14 sphinx_rtd_theme==0.4.3
71119
python3 setup.py install
72120
sphinx-build docs/source /tmp/build
73121
74122
- run:
75123
name: git push
76124
command: |
77125
git config user.email "[email protected]"
78-
git config user.name "Daniel Flook"
126+
git config user.name "CircleCI"
79127
80128
git checkout gh-pages
81129
rm -rf * .circleci
82130
cp -R /tmp/build/. .
83131
git add --all
84-
git commit -m "Update docs" || true
132+
git commit -m "Update docs\n[skip ci]" || true
85133
git push
86134
87135
workflows:
88136
version: 2
89137
build:
90138
jobs:
91-
- test:
92-
python: python36
93-
- test:
94-
python: python37
139+
- test_python26
140+
- test_python33
141+
- test
142+
#
143+
# - xtest:
144+
# name: xtest_python26
145+
# interpreter: python26
146+
# requires:
147+
# - test_python26
148+
# - xtest:
149+
# name: xtest_python27
150+
# interpreter: python27
151+
# requires:
152+
# - test
153+
# - xtest:
154+
# name: xtest_python33
155+
# interpreter: python33
156+
# image: fedora28
157+
# requires:
158+
# - test_python33
159+
# - xtest:
160+
# name: xtest_python34
161+
# interpreter: python34
162+
# requires:
163+
# - test
164+
# - xtest:
165+
# name: xtest_python35
166+
# interpreter: python35
167+
# requires:
168+
# - test
169+
# - xtest:
170+
# name: xtest_python36
171+
# interpreter: python36
172+
# requires:
173+
# - test
174+
# - xtest:
175+
# name: xtest_python37
176+
# interpreter: python37
177+
# requires:
178+
# - test
179+
# - xtest:
180+
# name: xtest_pypy3
181+
# interpreter: pypy3
182+
# requires:
183+
# - test
184+
#
185+
- publish:
186+
# requires:
187+
# - xtest_python26
188+
# - xtest_python27
189+
# - xtest_python33
190+
# - xtest_python34
191+
# - xtest_python35
192+
# - xtest_python36
193+
# - xtest_python37
194+
# - xtest_pypy3
195+
filters:
196+
branches:
197+
only: master
198+
199+
- publish_docs:
200+
requires:
201+
- publish

.circleci/local-test.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
circleci config process .circleci/config.yml > .circleci-config.yml
6+
7+
if [[ "$@" == "" ]]; then
8+
circleci local execute --config .circleci-config.yml --job test
9+
circleci local execute --config .circleci-config.yml --job test_python26
10+
circleci local execute --config .circleci-config.yml --job test_python33
11+
circleci local execute --config .circleci-config.yml --job xtest_python26
12+
circleci local execute --config .circleci-config.yml --job xtest_python27
13+
circleci local execute --config .circleci-config.yml --job xtest_python33
14+
circleci local execute --config .circleci-config.yml --job xtest_python34
15+
circleci local execute --config .circleci-config.yml --job xtest_python35
16+
circleci local execute --config .circleci-config.yml --job xtest_python36
17+
circleci local execute --config .circleci-config.yml --job xtest_python37
18+
circleci local execute --config .circleci-config.yml --job xtest_pypy3
19+
else
20+
circleci local execute --config .circleci-config.yml --job $@
21+
fi

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ docs/build/
1414
docs/source/transforms/*.min.py
1515
.cache/
1616
.pytest_cache/
17+
.circleci-config.yml

requirements-dev.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
tox<3
2-
virtualenv<16
3-
pytest<=4.3.0
4-
sphinx==1.8.4
5-
sphinxcontrib-programoutput==0.13
6-
sphinx_rtd_theme==0.4.3
7-
pyyaml==3.13
8-
sh==1.12.14
1+
tox
2+
virtualenv
3+
pytest
4+
sphinx
5+
sphinxcontrib-programoutput
6+
sphinx_rtd_theme
7+
pyyaml
8+
sh

tox.ini

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,28 @@ envlist = python26,python27,python33,python34,python35,python36,python37,pypy,py
33

44
[testenv]
55
deps =
6-
pytest
7-
sh
8-
pyyaml
6+
pytest==4.5.0
7+
sh==1.12.14
8+
pyyaml==5.1
99
commands =
10-
pytest --maxfail=1 test
11-
#pytest --maxfail=1 xtest
10+
pytest {posargs:test}
1211

1312
[testenv:python26]
1413
basepython = /usr/bin/python2.6
14+
deps =
15+
pytest==3.2.5
16+
sh==1.12.14
17+
pyyaml==3.13
1518

1619
[testenv:python27]
1720
basepython = /usr/bin/python2.7
1821

1922
[testenv:python33]
2023
basepython = /usr/bin/python3.3
24+
deps =
25+
pytest==3.2.5
26+
sh==1.12.14
27+
pyyaml==3.13
2128

2229
[testenv:python34]
2330
basepython = /usr/bin/python3.4
@@ -31,9 +38,6 @@ basepython = /usr/bin/python3.6
3138
[testenv:python37]
3239
basepython = /usr/bin/python3.7
3340

34-
[testenv:python38]
35-
basepython = /usr/local/bin/python3.8
36-
3741
[testenv:pypy]
3842
basepython = /usr/bin/pypy
3943

xtest/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ parse back into the original module, that test fails.
1212
Minifies and executes files listed in a test manifest. Multiple combinations of options are tested, with aditional
1313
options specified where necessary. A non zero exit code from a minified execution is a test failure.
1414

15-
The `test_manifests` directory contains manifests for testing the cpython/pypy regression tests on supported python versions.
15+
The `manifests` directory contains manifests for testing the cpython/pypy regression tests on supported python versions.

0 commit comments

Comments
 (0)