diff --git a/.coveragerc b/.coveragerc index 09a78e0f..b374850f 100644 --- a/.coveragerc +++ b/.coveragerc @@ -13,7 +13,7 @@ parallel = true [report] show_missing = true precision = 2 -omit = +omit = */__init__.py exclude_lines = pragma: no cover def __repr__ diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 00000000..0f7914b3 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,29 @@ +# This is GitHub Action for linting and security check +name: CI +on: + pull_request: + branches: [master] + +jobs: + checks: + runs-on: ubuntu-18.04 + strategy: + fail-fast: false + matrix: + python-version: ["3.10"] + env: [security, flake8, pylint] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Run check + env: + TOXENV: ${{ matrix.env }} + run: | + pip install -U tox + tox \ No newline at end of file diff --git a/tox.ini b/tox.ini index 97b03c94..ec9f0e4c 100644 --- a/tox.ini +++ b/tox.ini @@ -27,10 +27,10 @@ commands = redis41: pip install redis=4.1.4 redis42: pip install redis=4.2.2 pip install . - python -m pytest --ignore=setup.py # --cov-report term --cov=scrapy_redis + python -m pytest # --cov-report term --cov=scrapy_redis [testenv:flake8] -basepython=python3.8 +basepython = python3.10 deps = {[base]deps} flake8 # https://github.com/tholo/pytest-flake8/issues/81 @@ -38,20 +38,18 @@ commands = flake8 docs tests [testenv:security] -basepython=python3.8 +basepython = python3.10 deps = bandit==1.7.3 commands = bandit -r -c .bandit.yml src/ tests/ [testenv:pylint] -basepython=python3.8 +basepython = python3.10 deps = {[base]deps} pylint==2.12.2 commands = pylint setup.py docs/ src/ tests/ -# TODO: build windows/linux/mac - -# TODO: build docs \ No newline at end of file +# TODO: build docs