Skip to content

Commit 6aa0f4f

Browse files
[travis] Merge "verify" and "test" stages
1 parent 62006b2 commit 6aa0f4f

File tree

5 files changed

+25
-47
lines changed

5 files changed

+25
-47
lines changed

.travis.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ install: skip
1111
before_install: skip
1212

1313
stages:
14-
- verify
1514
- test
1615
- name: deploy latest docs
1716
if: (branch = master OR branch =~ ^infra/$) AND type = push
@@ -28,19 +27,8 @@ script:
2827
- if [[ "$TRAVIS_OS_NAME" != "linux" ]]; then ./.travis/build.sh; fi
2928

3029
jobs:
31-
include:
32-
- &docker_verify
33-
stage: verify
34-
env: DISTRO=fedora:latest PYTHON="2"
35-
script:
36-
- source ./.travis/lib-util.sh
37-
- util::docker-run $DISTRO ./.travis/verify.sh
38-
39-
- <<: *docker_verify
40-
env: DISTRO=fedora:latest PYTHON="3"
41-
42-
4330
# need to explictly define each builder for test due to different os types
31+
include:
4432
- stage: test
4533
env: DISTRO=debian:stable PYTHON="2"
4634

@@ -54,7 +42,7 @@ jobs:
5442
env: DISTRO=centos:7 PYTHON="2" # el7 doesn't do python3 modules
5543

5644
- stage: test
57-
env: DISTRO=fedora:latest PYTHON="3"
45+
env: DISTRO=fedora:latest PYTHON="3" FLAKE="yes"
5846

5947
- stage: test
6048
env: DISTRO=fedora:latest PYTHON="2"

.travis/build.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@
44
source ./.travis/lib-setup.sh
55
setup::install
66

7+
if [ x"$FLAKE" = "xyes" ]; then
8+
flake8 setup.py
9+
F8_SETUP=$?
10+
11+
flake8 gssapi
12+
F8_PY=$?
13+
14+
# Cython requires special flags since it is not proper Python:
15+
# - E225: missing whitespace around operator
16+
# - E226: missing whitespace around arithmetic operator
17+
# - E227: missing whitespace around bitwise or shift operator
18+
# - E402: module level import not at top of file (needed for the `GSSAPI="blah" lines)
19+
# - E901: SyntaxError or IndentationError
20+
# - E999: Internal AST compilation error (flake8 specific)
21+
flake8 gssapi --filename='*.pyx,*.pxd' --ignore=E225,E226,E227,E402,E901,E999
22+
F8_MAIN_CYTHON=$?
23+
24+
if [ $F8_SETUP -ne 0 -o $F8_PY -ne 0 -o $F8_MAIN_CYTHON -ne 0 ]; then
25+
exit 1
26+
fi
27+
fi
28+
729
# always build in-place so that Sphinx can find the modules
830
python setup.py build_ext --inplace $EXTRA_BUILDEXT
931
BUILD_RES=$?

.travis/lib-util.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ util::docker-run() {
1111
-e PKG_NAME_VER=$PKG_NAME_VER \
1212
-e KRB5_VER=$KRB5_VER \
1313
-e PYTHON=$PYTHON \
14+
-e FLAKE=$FLAKE \
1415
$distro \
1516
/bin/bash -ex $@
1617
}

.travis/lib-verify.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

.travis/verify.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)