Skip to content

Commit fa415e0

Browse files
chore: Update targets to run lint / test at Circle CI.
1 parent 78a4f81 commit fa415e0

File tree

2 files changed

+31
-19
lines changed

2 files changed

+31
-19
lines changed

.circleci/config.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,32 @@ jobs:
55
- image: playpauseandstop/docker-python:1.0.3-py37
66
steps:
77
- checkout
8-
- run: make lint
8+
- run: make install
9+
- run: make ci-lint
910

1011
test35:
1112
docker:
1213
- image: playpauseandstop/docker-python:1.0.3-py35
1314
steps:
1415
- checkout
15-
- run: TOXENV=py35 make test
16+
- run: make install
17+
- run: TOXENV=py35 make ci-test
1618

1719
test36:
1820
docker:
1921
- image: playpauseandstop/docker-python:1.0.3-py36
2022
steps:
2123
- checkout
22-
- run: TOXENV=py36 make test
24+
- run: make install
25+
- run: TOXENV=py36 make ci-test
2326

2427
test37:
2528
docker: *py37
2629
steps:
2730
- checkout
2831
- run: mkdir -p test-results
29-
- run: PYTEST_ADDOPTS=--junitxml=test-results/junit.xml TOXENV=py37 make test
32+
- run: make install
33+
- run: PYTEST_ADDOPTS=--junitxml=test-results/junit.xml TOXENV=py37 make ci-test
3034
- run: make coveralls
3135
- store_test_results:
3236
path: test-results
@@ -37,7 +41,8 @@ jobs:
3741
docker: *py37
3842
steps:
3943
- checkout
40-
- run: make install deploy
44+
- run: make install
45+
- run: make ci-deploy
4146

4247
workflows:
4348
version: 2

Makefile

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
.PHONY: clean \
1+
.PHONY: ci-deploy \
2+
ci-lint \
3+
ci-test \
4+
clean \
25
coveralls \
3-
deploy \
46
distclean \
57
docs \
68
install \
79
lint \
10+
list-outdated \
811
test \
912
update-setup-py
1013

@@ -19,13 +22,7 @@ SPHINXBUILD ?= $(POETRY) run sphinx-build
1922

2023
all: install
2124

22-
clean:
23-
find . \( -name __pycache__ -o -type d -empty \) -exec rm -rf {} + 2> /dev/null
24-
25-
coveralls:
26-
-$(PYTHON) -m coveralls
27-
28-
deploy:
25+
ci-deploy:
2926
ifeq ($(TWINE_USERNAME),)
3027
# TWINE_USERNAME env var should be supplied
3128
exit 1
@@ -41,6 +38,18 @@ endif
4138
$(POETRY) build
4239
$(POETRY) publish -u $(TWINE_USERNAME) -p $(TWINE_PASSWORD)
4340

41+
ci-lint:
42+
SKIP=$(SKIP) $(PRE_COMMIT) run --all $(HOOK)
43+
44+
ci-test:
45+
TOXENV=$(TOXENV) $(PYTHON) -m tox $(TOX_ARGS) -- $(TEST_ARGS)
46+
47+
clean:
48+
find . \( -name __pycache__ -o -type d -empty \) -exec rm -rf {} + 2> /dev/null
49+
50+
coveralls:
51+
-$(PYTHON) -m coveralls
52+
4453
distclean: clean
4554
rm -rf build/ dist/ *.egg*/ .venv/
4655

@@ -57,14 +66,12 @@ endif
5766
$(POETRY) install
5867
touch $@
5968

60-
lint: .install
61-
SKIP=$(SKIP) $(PRE_COMMIT) run --all $(HOOK)
69+
lint: install ci-lint
6270

63-
list-outdated: .install
71+
list-outdated: install
6472
$(POETRY) show -o
6573

66-
test: .install clean lint
67-
TOXENV=$(TOXENV) $(PYTHON) -m tox $(TOX_ARGS) -- $(TEST_ARGS)
74+
test: install clean lint ci-test
6875

6976
update-setup-py: .install
7077
rm -rf dist/

0 commit comments

Comments
 (0)