forked from jrnl-org/jrnl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
121 lines (108 loc) · 2.57 KB
/
config.yml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version: 2.1
executors:
python37:
docker:
- image: circleci/python:3.7.9
resource_class: small
python38:
docker:
- image: circleci/python:3.8.6
resource_class: small
python39:
docker:
- image: circleci/python:3.9.0
resource_class: small
commands:
get_poetry_deps:
steps:
- run:
name: Checking Python version
command: python --version > /tmp/pythonversion
- restore_cache:
key: 'deps-00-{{ checksum "poetry.lock" }}-{{ checksum "/tmp/pythonversion" }}'
- run:
name: Installing dependencies
command: |
poetry config --local virtualenvs.in-project true
poetry install --no-root --remove-untracked
- save_cache:
key: 'deps-00-{{ checksum "poetry.lock" }}-{{ checksum "/tmp/pythonversion" }}'
paths:
- ~/project/.venv
pytest:
steps:
- run:
name: Tests - Pytest
when: always
command: >
poetry run pytest
--junitxml=reports/pytest/results.xml
behave:
steps:
- run:
name: Tests - Behave
when: always
command: >
poetry run behave
--no-skipped
--format progress2
--junit
--junit-directory reports/behave
lint:
steps:
- run:
name: Poetry Check
when: always
command: |
poetry --version
poetry check
- run:
name: Black Code Formatter
when: always
command: |
poetry run black --version
poetry run black --check --diff .
- run:
name: PyFlakes
when: always
command: |
poetry run pyflakes --version
poetry run pyflakes jrnl features tests
aliases:
linux_test: &linux_test
steps:
- checkout
- get_poetry_deps
- run: poetry install
- pytest
- behave
- store_test_results:
path: reports
jobs:
test_37_linux:
executor: python37
<<: *linux_test
test_38_linux:
executor: python38
<<: *linux_test
test_39_linux:
executor: python39
<<: *linux_test
linting:
executor: python39
steps:
- checkout
- get_poetry_deps
- lint
workflows:
version: 2
main:
jobs:
- linting:
name: Linting and Formatting
- test_37_linux:
name: Python 3.7 - Linux
- test_38_linux:
name: Python 3.8 - Linux
- test_39_linux:
name: Python 3.9 - Linux