Skip to content

Commit d4eb684

Browse files
authored
Use Nox in CircleCI (scrapd#143)
Replaces the `make` command by the `nox` ones. Drive-by: * Update `.pylintrc` configuration file to suppress the report.
1 parent cf63165 commit d4eb684

File tree

3 files changed

+29
-14
lines changed

3 files changed

+29
-14
lines changed

.circleci/config.yml

+26-11
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ working_directory: &working_directory
33

44
defaults: &defaults
55
docker:
6-
- image: circleci/python:3.7.2-stretch-node
6+
- image: circleci/python:3.7.3-stretch-node
77
working_directory: *working_directory
88

99
repo_cache_key: &repo_cache_key
@@ -19,14 +19,22 @@ jobs:
1919
keys: *repo_cache_key
2020
- run:
2121
name: prepare environment
22-
command: make venv
22+
command: |
23+
python -m venv venv
24+
source venv/bin/activate
25+
pip install --upgrade pip
26+
pip install nox coveralls
27+
nox --install-only -s lint-format lint docs test-units test-integrations
2328
- save_cache:
2429
paths:
25-
- ./venv
30+
- .nox
31+
- venv
2632
key: *repo_cache_key
2733
- persist_to_workspace:
2834
root: *working_directory
29-
paths: venv/*
35+
paths:
36+
- .nox/*
37+
- venv/*
3038

3139
format:
3240
<<: *defaults
@@ -36,7 +44,9 @@ jobs:
3644
at: *working_directory
3745
- run:
3846
name: check formatter
39-
command: make lint-format
47+
command: |
48+
source venv/bin/activate
49+
nox -s lint-format
4050
4151
lint:
4252
<<: *defaults
@@ -46,7 +56,9 @@ jobs:
4656
at: *working_directory
4757
- run:
4858
name: run linters
49-
command: make lint
59+
command: |
60+
source venv/bin/activate
61+
nox -s lint
5062
5163
docs:
5264
<<: *defaults
@@ -56,7 +68,9 @@ jobs:
5668
at: *working_directory
5769
- run:
5870
name: run doc tests
59-
command: make docs
71+
command: |
72+
source venv/bin/activate
73+
nox -s docs
6074
6175
test-units:
6276
<<: *defaults
@@ -67,9 +81,9 @@ jobs:
6781
- run:
6882
name: run unit tests
6983
command: |
70-
make test-units
71-
venv/bin/pip install coveralls
72-
venv/bin/coveralls
84+
source venv/bin/activate
85+
nox -s test-units
86+
coveralls
7387
- store_test_results:
7488
path: test-results
7589
test-integrations:
@@ -81,7 +95,8 @@ jobs:
8195
- run:
8296
name: run integration tests
8397
command: |
84-
make test-integrations
98+
source venv/bin/activate
99+
nox -s test-integrations
85100
86101
publish:
87102
<<: *defaults

.pylintrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ disable = broad-except,invalid-name,logging-format-interpolation,no-self-use,
3232
# Set the output format. Available formats are text, parseable, colorized, msvs
3333
# (visual studio) and html. You can also give a reporter class, eg
3434
# mypackage.mymodule.MyReporterClass.
35-
output-format=text
35+
output-format=colorized
3636

3737
# Put messages in a separate file for each module / package specified on the
3838
# command line instead of printing them on stdout. Reports (if any) will be
@@ -41,7 +41,7 @@ output-format=text
4141
files-output=no
4242

4343
# Tells whether to display a full report or only the messages
44-
reports=yes
44+
reports=no
4545

4646
# Python expression which should return a note less than 10 (10 is the highest
4747
# note). You have access to the variables errors warning, statement which

noxfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def ci(session):
2727
session.install('-rrequirements-dev.txt')
2828
session.install('.')
2929
run_sphinx(session)
30+
run_yapf(session, True)
3031
run_all_linters(session)
3132
run_pytest_units(session)
3233
run_pytest_integrations(session)
@@ -146,7 +147,6 @@ def run_all_linters(session):
146147
run_flake8(session)
147148
run_pydocstyle(session)
148149
run_pylint(session)
149-
run_yapf(session, True)
150150

151151

152152
def run_flake8(session):

0 commit comments

Comments
 (0)