|
1 | 1 | version: 2.1
|
2 | 2 |
|
3 |
| -commands: |
4 |
| - install-packaged-autonormalize: |
5 |
| - description: "install autonormalize from source distribution" |
6 |
| - steps: |
7 |
| - - run : | |
8 |
| - source test_env/bin/activate |
9 |
| - python setup.py sdist |
10 |
| - AUTONORMALIZE_VERSION=$(python setup.py --version) |
11 |
| - tar -zxvf "dist/autonormalize-${AUTONORMALIZE_VERSION}.tar.gz" |
12 |
| - pip install -e "autonormalize-${AUTONORMALIZE_VERSION}/" |
13 |
| - pip install -r "autonormalize-${AUTONORMALIZE_VERSION}/test-requirements.txt" |
14 |
| - run-packaged-tests: |
15 |
| - description: "run unit tests on packaged testing files" |
16 |
| - steps: |
17 |
| - - run: | |
18 |
| - source test_env/bin/activate |
19 |
| - cd "autonormalize-$(python setup.py --version)/" |
20 |
| - pytest |
21 |
| -
|
22 |
| -jobs: |
23 |
| - "python-27": |
24 |
| - working_directory: ~/auto-norm |
| 3 | +executors: |
| 4 | + python: |
| 5 | + parameters: |
| 6 | + image_tag: |
| 7 | + type: string |
| 8 | + default: "python:3.7" |
25 | 9 | docker:
|
26 |
| - - image: circleci/python:2.7 |
27 |
| - steps: |
28 |
| - - checkout |
29 |
| - - run: virtualenv test_env && virtualenv dev_env |
30 |
| - - install-packaged-autonormalize |
31 |
| - - run: source dev_env/bin/activate && make installdeps |
32 |
| - - run: source dev_env/bin/activate && make lint |
33 |
| - - run-packaged-tests |
| 10 | + - image: circleci/<< parameters.image_tag >> |
34 | 11 |
|
35 |
| - "python-35": |
36 |
| - working_directory: ~/auto-norm |
37 |
| - docker: |
38 |
| - - image: circleci/python:3.5 |
| 12 | +commands: |
| 13 | + installation: |
39 | 14 | steps:
|
40 | 15 | - checkout
|
41 |
| - - run: virtualenv test_env && virtualenv dev_env |
42 |
| - - install-packaged-autonormalize |
43 |
| - - run: source dev_env/bin/activate && make installdeps |
44 |
| - - run: source dev_env/bin/activate && make lint |
45 |
| - - run-packaged-tests |
| 16 | + - run: |
| 17 | + name: "Package Installation to Virtual Environment" |
| 18 | + command: | |
| 19 | + python setup.py sdist |
| 20 | + PACKAGE=$(python setup.py --fullname) |
| 21 | + tar -zxvf "dist/${PACKAGE}.tar.gz" |
| 22 | + mv ${PACKAGE} package |
| 23 | + virtualenv python -q |
| 24 | + source python/bin/activate |
| 25 | + pip install -e package --progress-bar off |
| 26 | + pip install -r package/test-requirements.txt --progress-bar off |
46 | 27 |
|
47 |
| - "python-36": |
48 |
| - working_directory: ~/auto-norm |
49 |
| - docker: |
50 |
| - - image: circleci/python:3.6 |
| 28 | +jobs: |
| 29 | + lint_tests: |
| 30 | + parameters: |
| 31 | + image_tag: |
| 32 | + type: string |
| 33 | + default: "python:3.7" |
| 34 | + executor: |
| 35 | + name: python |
| 36 | + image_tag: << parameters.image_tag >> |
51 | 37 | steps:
|
52 |
| - - checkout |
53 |
| - - run: virtualenv test_env && virtualenv dev_env |
54 |
| - - install-packaged-autonormalize |
55 |
| - - run: source dev_env/bin/activate && make installdeps |
56 |
| - - run: source dev_env/bin/activate && make lint |
57 |
| - - run-packaged-tests |
| 38 | + - installation |
| 39 | + - run: |
| 40 | + name: "Lint Tests" |
| 41 | + command: | |
| 42 | + source python/bin/activate |
| 43 | + make -C package lint-tests --makefile ../Makefile |
58 | 44 |
|
59 |
| - "python-37": |
60 |
| - working_directory: ~/auto-norm |
61 |
| - docker: |
62 |
| - - image: circleci/python:3.7 |
| 45 | + unit_tests: |
| 46 | + parameters: |
| 47 | + image_tag: |
| 48 | + type: string |
| 49 | + default: "python:3.7" |
| 50 | + executor: |
| 51 | + name: python |
| 52 | + image_tag: << parameters.image_tag >> |
63 | 53 | steps:
|
64 |
| - - checkout |
65 |
| - - run: virtualenv test_env && virtualenv dev_env |
66 |
| - - install-packaged-autonormalize |
67 |
| - - run: source dev_env/bin/activate && make installdeps |
68 |
| - - run: source dev_env/bin/activate && make lint |
69 |
| - - run-packaged-tests |
| 54 | + - installation |
| 55 | + - run: |
| 56 | + name: "Unit Tests" |
| 57 | + command: | |
| 58 | + source python/bin/activate |
| 59 | + make -C package unit-tests --makefile ../Makefile |
70 | 60 |
|
| 61 | + entry_point_test: |
| 62 | + parameters: |
| 63 | + image_tag: |
| 64 | + type: string |
| 65 | + default: "python:3.7" |
| 66 | + executor: |
| 67 | + name: python |
| 68 | + image_tag: << parameters.image_tag >> |
| 69 | + steps: |
| 70 | + - installation |
| 71 | + - run: |
| 72 | + name: "Entry Point Test" |
| 73 | + command: | |
| 74 | + source python/bin/activate |
| 75 | + make -C package entry-point-test --makefile ../Makefile |
71 | 76 |
|
72 | 77 | workflows:
|
73 | 78 | version: 2
|
74 |
| - test_all_python_versions: |
| 79 | + "Integration Tests": |
75 | 80 | jobs:
|
76 |
| - - "python-27" |
77 |
| - - "python-35" |
78 |
| - - "python-36" |
79 |
| - - "python-37" |
| 81 | + - lint_tests: |
| 82 | + name: "Lint Tests - Python 3.5" |
| 83 | + image_tag: "python:3.5" |
| 84 | + - lint_tests: |
| 85 | + name: "Lint Tests - Python 3.6" |
| 86 | + image_tag: "python:3.6" |
| 87 | + - lint_tests: |
| 88 | + name: "Lint Tests - Python 3.7" |
| 89 | + image_tag: "python:3.7" |
| 90 | + - unit_tests: |
| 91 | + name: "Unit Tests - Python 3.5" |
| 92 | + image_tag: "python:3.5" |
| 93 | + - unit_tests: |
| 94 | + name: "Unit Tests - Python 3.6" |
| 95 | + image_tag: "python:3.6" |
| 96 | + - unit_tests: |
| 97 | + name: "Unit Tests - Python 3.7" |
| 98 | + image_tag: "python:3.7" |
| 99 | + - entry_point_test: |
| 100 | + name: "Entry Point Test - Python 3.5" |
| 101 | + image_tag: "python:3.5" |
| 102 | + - entry_point_test: |
| 103 | + name: "Entry Point Test - Python 3.6" |
| 104 | + image_tag: "python:3.6" |
| 105 | + - entry_point_test: |
| 106 | + name: "Entry Point Test - Python 3.7" |
| 107 | + image_tag: "python:3.7" |
0 commit comments