-
Notifications
You must be signed in to change notification settings - Fork 9
137 lines (136 loc) · 3.94 KB
/
run_tests.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
on:
pull_request:
branches:
- master
- beta
paths-ignore:
- 'docs/*'
name: Python Tests
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8']
name: python ${{ matrix.python-version }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Initialize python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: install CI dependencies
run: |
python -m pip install --upgrade pip
pip install pylint mypy
- name: install SDK
run: python setup.py install
- name: lint - pylint
# Disabled linters:
# R0801 - duplicate-code
# R0913 - too-many-arguments
# R0914 - too-many-locals
# C0103 - invalid-name
# C0114 - missing-module-docstring
# C0116 - missing-function-docstring
# C0209 - consider-using-f-string
# C0301 - line-too-long
# C0302 - too-many-lines
# C0415 - import-outside-toplevel
# W0212 - protected-access
# C0115 - missing-class-docstring
# C0201 - consider-iterating-dictionary
# C0206 - consider-using-dict-items
# C0304 - missing-final-newline
# C0305 - trailing-newlines
# C0411 - wrong-import-order
# C0413 - wrong-import-position
# C0414 - useless-import-alias
# E0102 - function-redefined
# E0401 - import-error
# E0611 - no-name-in-module
# E1101 - no-member
# R0902 - too-many-instance-attributes
# R0912 - too-many-branches
# R0915 - too-many-statements
# R0916 - too-many-boolean-expressions
# R1702 - too-many-nested-blocks
# R1710 - inconsistent-return-statement
# R1720 - no-else-raise
# R1732 - consider-using-with
# W0102 - dangerous-default-value
# W0105 - pointless-string-statement
# W0107 - unnecessary-pass
# W0404 - reimported
# W0511 - fixme
# W0611 - unused-import
# W0612 - unused-variable
# W0613 - unused-argument
# W0621 - redefined-outer-name
# W0622 - redefined-builtin
# W0702 - bare-except
# W0703 - broad-except
# W0706 - try-except-raise
# W0707 - raise-missing-from
# W0719 - broad-exception-raised
# W1510 - subprocess-run-check
# W1514 - unspecified-encoding
run: |
python -m pylint $(git ls-files '*.py') \
-d R0801 \
-d R0913 \
-d R0914 \
-d C0103 \
-d C0114 \
-d C0116 \
-d C0209 \
-d C0301 \
-d C0302 \
-d C0415 \
-d W0212 \
-d C0115 \
-d C0201 \
-d C0206 \
-d C0304 \
-d C0305 \
-d C0411 \
-d C0413 \
-d C0414 \
-d E0102 \
-d E0401 \
-d E0611 \
-d E1101 \
-d E4702 \
-d R0902 \
-d R0912 \
-d R0915 \
-d R0916 \
-d R1702 \
-d R1710 \
-d R1720 \
-d R1732 \
-d W0102 \
-d W0105 \
-d W0107 \
-d W0404 \
-d W0511 \
-d W0611 \
-d W0612 \
-d W0613 \
-d W0621 \
-d W0622 \
-d W0702 \
-d W0703 \
-d W0706 \
-d W0707 \
-d W0719 \
-d W1510 \
-d W1514
shell: bash
- name: lint - mypy
run: python -m mypy --strict $(git ls-files '*.py') || true
- name: unit tests
run: |
pip install -r tests/requirements.txt
pytest tests/rubrik_polaris