forked from StackStorm-Exchange/ci
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yml
More file actions
executable file
·66 lines (61 loc) · 2.22 KB
/
Copy pathconfig.yml
File metadata and controls
executable file
·66 lines (61 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# DO NOT COPY THIS CONFIG - this is the CI config for the ci repository itself,
# IT IS NOT THE CI CONFIG FOR PACKS.
# The sample pack CI config is .circle/config.yml.sample
version: 2
jobs:
test_py36:
docker:
- image: circleci/python:3.6
working_directory: ~/ci
environment:
VIRTUALENV_DIR: "~/virtualenv"
steps:
- checkout
- restore_cache:
key: v1-dependency-cache-{{ checksum ".circle/requirements-ci-ci.txt" }}
- run:
name: Download and Install Dependencies
command: |
git clone --depth 1 --single-branch --branch "${LINT_CONFIGS_BRANCH:-master}" https://github.com/StackStorm/lint-configs.git ~/ci/lint-configs
sudo pip install -U "pip==20.0.2" setuptools virtualenv pyyaml
virtualenv ~/virtualenv
~/virtualenv/bin/pip install flake8 pylint pyyaml requests
- save_cache:
key: v1-dependency-cache-{{ checksum ".circle/requirements-ci-ci.txt" }}
paths:
- ~/.cache/pip
- ~/.apt-cache
- run:
name: Check YAML file syntax
command: >
find . \( -name '*.yml' \
-o -name '*.yml.sample' \
-o -name '*.yaml' \
-o -name '*.yaml.sample' \) \
-print | \
xargs -I "{}" python -c 'import yaml; yaml.safe_load(open("{}").read())'
- run:
name: Check Bash file syntax
command: |
find . -name '*.sh' | xargs bash -n
grep -lrE '^#!/bin/bash' . | xargs bash -n
- run:
name: Check Python files
command: |
~/virtualenv/bin/flake8 --max-line-length=100 --config=~/ci/lint-configs/python/.flake8-exchange
find . -name '*.py' | xargs ~/virtualenv/bin/pylint --rcfile=~/ci/lint-configs/python/.pylintrc-pack-ci
- run:
name: Check Makefile syntax
command: |
find . -name Makefile | xargs make -n
# - persist_to_workspace:
# root: /
# paths:
# - home/circleci/ci
# - home/circleci/virtualenv
# - home/circleci/.gitconfig
workflows:
version: 2
build_test_deploy:
jobs:
- test_py36