-
Notifications
You must be signed in to change notification settings - Fork 73
41 lines (39 loc) · 1.34 KB
/
main.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
name: Python IDB
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['2.7', '3.6', '3.7', '3.8']
name: Python ${{ matrix.python-version }} at ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -I PyPI capstone flake8
pip install --upgrade pytest-cov pytest
pip install -e .
- name: QA checks
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run tests
shell: bash
run: |
set -e
find . -name \*.py -exec pycodestyle --ignore=E501 {} \;
for f in $(find . -name test\*py)
do
py.test -v --cov=idb $f
done