|
4 | 4 | version: 2 |
5 | 5 |
|
6 | 6 | jobs: |
7 | | - test_py27: |
8 | | - docker: |
9 | | - - image: circleci/python:2.7 |
10 | | - |
11 | | - working_directory: ~/ci |
12 | | - |
13 | | - environment: |
14 | | - VIRTUALENV_DIR: "~/virtualenv" |
15 | | - |
16 | | - steps: |
17 | | - - checkout |
18 | | - - restore_cache: |
19 | | - key: v1-dependency-cache-{{ checksum ".circle/requirements-ci-ci.txt" }} |
20 | | - - run: |
21 | | - name: Download and Install Dependencies |
22 | | - command: | |
23 | | - git clone --depth 1 --single-branch --branch "${LINT_CONFIGS_BRANCH:-master}" https://github.com/StackStorm/lint-configs.git ~/ci/lint-configs |
24 | | - sudo pip install -U "pip>=9.0,<9.1" setuptools virtualenv pyyaml |
25 | | - virtualenv ~/virtualenv |
26 | | - ~/virtualenv/bin/pip install flake8 pylint pyyaml requests |
27 | | - - save_cache: |
28 | | - key: v1-dependency-cache-{{ checksum ".circle/requirements-ci-ci.txt" }} |
29 | | - paths: |
30 | | - - ~/.cache/pip |
31 | | - - ~/.apt-cache |
32 | | - - run: |
33 | | - name: Check YAML file syntax |
34 | | - command: > |
35 | | - find . \( -name '*.yml' \ |
36 | | - -o -name '*.yml.sample' \ |
37 | | - -o -name '*.yaml' \ |
38 | | - -o -name '*.yaml.sample' \) \ |
39 | | - -print | \ |
40 | | - xargs -I "{}" python -c 'import yaml; yaml.safe_load(open("{}").read())' |
41 | | - - run: |
42 | | - name: Check Bash file syntax |
43 | | - command: | |
44 | | - find . -name '*.sh' | xargs bash -n |
45 | | - grep -lrE '^#!/bin/bash' . | xargs bash -n |
46 | | - - run: |
47 | | - name: Check Python files |
48 | | - command: | |
49 | | - ~/virtualenv/bin/flake8 --max-line-length=100 --config=~/ci/lint-configs/python/.flake8-exchange |
50 | | - find . -name '*.py' | xargs ~/virtualenv/bin/pylint --rcfile=~/ci/lint-configs/python/.pylintrc-pack-ci |
51 | | - - run: |
52 | | - name: Check Makefile syntax |
53 | | - command: | |
54 | | - find . -name Makefile | xargs make -n |
55 | | - # - persist_to_workspace: |
56 | | - # root: / |
57 | | - # paths: |
58 | | - # - home/circleci/ci |
59 | | - # - home/circleci/virtualenv |
60 | | - # - home/circleci/.gitconfig |
61 | | - |
62 | 7 | test_py36: |
63 | 8 | docker: |
64 | 9 | - image: circleci/python:3.6 |
@@ -118,5 +63,4 @@ workflows: |
118 | 63 | version: 2 |
119 | 64 | build_test_deploy: |
120 | 65 | jobs: |
121 | | - - test_py27 |
122 | 66 | - test_py36 |
0 commit comments