Skip to content

Commit

Permalink
Merge pull request #303 from akaihola/less-ci-linting
Browse files Browse the repository at this point in the history
Skip linting in certain CI configurations
  • Loading branch information
akaihola authored Feb 27, 2022
2 parents a6868c1 + 3ba49f3 commit fb99357
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
- '3.9'
- '3.10'
constraints: ['']
lint: ['--darker --flake8 --isort']
include:
- os: ubuntu-latest
python-version: '3.7'
Expand All @@ -61,7 +62,9 @@ jobs:
python-version: '3.10'
constraints: '--constraint constraints-future.txt'
upgrade: '--upgrade --upgrade-strategy=eager'

env:
RUN_MYPY: >-
${{ matrix.python-version == '3.9' || matrix.python-version == '3.10' }}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -78,9 +81,14 @@ jobs:
# strict dependency resolution added in pip 20.3
python -m pip install --upgrade 'pip>=20.3'
pip install ${pip_options} -e '.[isort,test]'
- name: Test with pytest
- name: Run Pytest without Mypy if Python < 3.9
if: env.RUN_MYPY == 'false'
run: |
pytest ${{ matrix.lint }}
- name: Run Pytest with Mypy if Python >= 3.9
if: env.RUN_MYPY == 'true'
run: |
pytest
pytest ${{ matrix.lint }} --mypy
- name: Bandit security audit for non-test code
run: bandit --recursive --exclude=./src/darker/tests .
- name: Bandit security audit for unit tests, allowing asserts
Expand Down
4 changes: 0 additions & 4 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@
doctest_optionflags = NORMALIZE_WHITESPACE
show_capture = no
addopts =
--darker
--flake8
--isort
--mypy
--doctest-modules
--durations 10

0 comments on commit fb99357

Please sign in to comment.