Skip to content
Snippets Groups Projects
Commit 19c9ce5f authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

Style-checking in CI.

parent 7a2f8202
No related branches found
No related tags found
No related merge requests found
...@@ -3,18 +3,20 @@ ...@@ -3,18 +3,20 @@
# #
# https://git.fmrib.ox.ac.uk/fsl/fslpy # https://git.fmrib.ox.ac.uk/fsl/fslpy
# #
# The build pipeline comprises four stages: # The build pipeline comprises the following stages:
# #
# 1. test: Unit tests # 1. test: Unit tests
# #
# 2. doc: Building API documentation # 2. style: Check coding style
# #
# 3. build: Building source distributions and wheels # 3. doc: Building API documentation
# #
# 4. deploy: Uploading the build outputs to pypi, and the documentation # 4. build: Building source distributions and wheels
#
# 5. deploy: Uploading the build outputs to pypi, and the documentation
# to a hosting server. # to a hosting server.
# #
# The test stage is executed on all branches of upstream and fork # The test and style stages are executed on all branches of upstream and fork
# repositories. # repositories.
# #
# The doc stage, and the deploy-doc job, is executed on all branches of the # The doc stage, and the deploy-doc job, is executed on all branches of the
...@@ -29,6 +31,7 @@ ...@@ -29,6 +31,7 @@
stages: stages:
- test - test
- style
- doc - doc
- build - build
- deploy - deploy
...@@ -76,6 +79,8 @@ variables: ...@@ -76,6 +79,8 @@ variables:
UPSTREAM_PROJECT: "fsl/fslpy" UPSTREAM_PROJECT: "fsl/fslpy"
UPSTREAM_URL: "git@git.fmrib.ox.ac.uk" UPSTREAM_URL: "git@git.fmrib.ox.ac.uk"
TEST_OPTS: "--cov-report= --cov-append" TEST_OPTS: "--cov-report= --cov-append"
FLAKE8_OPTS: "--ignore=E127,E201,E203,E221,E222,E241,E271,E272,E301,E302,E303,E701"
PYLINT_OPTS: "--extension-pkg-whitelist=numpy,wx --generated-members=np.int8,np.uint8,np.int16,np.uint16,np.int32,np.uint32,np.int64,np.uint64,np.float32,np.float64,np.float128,wx.PyDeadObjectError --disable=R,C,W0511,W0703,W1202"
#################################### ####################################
...@@ -292,6 +297,8 @@ test:3.4: ...@@ -292,6 +297,8 @@ test:3.4:
image: python:3.4 image: python:3.4
# a wxphoenix/3.5 build # a wxphoenix/3.5 build
# is not yet available # is not yet available
# test:3.5: # test:3.5:
...@@ -306,6 +313,25 @@ test:3.4: ...@@ -306,6 +313,25 @@ test:3.4:
# image: python:3.6 # image: python:3.6
#############
# Style stage
#############
style:
stage: style
tags:
- docker
image: python:3.5
script:
- pip install flake8 pylint
- flake8 $FLAKE8_OPTS fsl || true
- pylint $PYLINT_OPTS --output-format=colorized fsl || true
########### ###########
# Doc stage # Doc stage
########### ###########
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment