diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d29ce09..884b7d7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,14 +48,13 @@ jobs: env: cache-name: cache-eggs with: - path: ./buildout-cache/eggs ./eggs + path: ~/buildout-cache/eggs key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }} - restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }} - name: buildout run: | cp test_plone${{matrix.PLONE_VERSION}}.cfg buildout.cfg - buildout annotate - buildout + buildout -c ci.cfg annotate + buildout -c ci.cfg - name: test run: | bin/test @@ -91,14 +90,16 @@ jobs: env: cache-name: cache-eggs with: - path: ./buildout-cache/eggs ./eggs - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }} - restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.PLONE_VERSION }} + path: ~/buildout-cache/eggs + key: ${{ runner.os }}-build-${{ env.cache-name }}-coverage-${{ matrix.PLONE_VERSION }} - name: buildout run: | cp test_plone${{matrix.PLONE_VERSION}}.cfg buildout.cfg - buildout annotate - buildout + buildout -c ci.cfg annotate + buildout -c ci.cfg + - name: code-analysis + run: | + bin/code-analysis - name: test coverage run: | bin/coverage run bin/test diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 0000000..edae036 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,6 @@ +[settings] +force_alphabetical_sort = True +force_single_line = True +lines_after_imports = 2 +line_length = 200 +not_skip = __init__.py \ No newline at end of file diff --git a/base.cfg b/base.cfg index 7231807..a3a9fd9 100644 --- a/base.cfg +++ b/base.cfg @@ -33,6 +33,11 @@ eggs = defaults = ['-s', '${buildout:package-name}', '--auto-color', '--auto-progress'] [code-analysis] -flake8-max-complexity = 50 -flake8-ignore = E501, W503, W504, E203, Q000, C812 -directory = src/imio/helpers \ No newline at end of file +recipe = plone.recipe.codeanalysis +pre-commit-hook = True +return-status-codes = True +directory = + ${buildout:directory}/src/imio/helpers +flake8-ignore = E123,E124,E501,E126,E127,E128,W391,C901,W503,W504 +flake8-extensions = + flake8-isort \ No newline at end of file diff --git a/ci.cfg b/ci.cfg new file mode 100644 index 0000000..146641f --- /dev/null +++ b/ci.cfg @@ -0,0 +1,11 @@ +[buildout] +extends = + buildout.cfg +eggs-directory = ~/.buildout/eggs + +parts += + createcoverage + +[createcoverage] +recipe = zc.recipe.egg +eggs = createcoverage \ No newline at end of file diff --git a/test_plone4.cfg b/test_plone4.cfg index 096ee46..28e2c49 100644 --- a/test_plone4.cfg +++ b/test_plone4.cfg @@ -14,6 +14,7 @@ allow-picked-versions = true setuptools = 42.0.2 zc.buildout = 2.13.2 configparser = 4.0.2 +isort = 4.3.21 Pillow = 4.0.0 coverage = 5.3.1 # Added by buildout at 2020-06-22 13:45:36.514713 diff --git a/test_plone51.cfg b/test_plone51.cfg index c159f4c..e2f298b 100644 --- a/test_plone51.cfg +++ b/test_plone51.cfg @@ -13,6 +13,7 @@ allow-picked-versions = true [versions] setuptools = 42.0.2 zc.buildout = 2.13.2 +isort = 4.3.21 toml = 0.10.2 traitlets = 4.3.2 # Added by buildout at 2020-06-22 13:24:06.304460 diff --git a/test_plone52.cfg b/test_plone52.cfg index 588b119..70abef0 100644 --- a/test_plone52.cfg +++ b/test_plone52.cfg @@ -13,6 +13,7 @@ allow-picked-versions = true [versions] setuptools = 42.0.2 zc.buildout = 2.13.2 +isort = 4.3.21 prompt-toolkit = 3.0.19 toml = 0.10.2 # Added by buildout at 2020-06-22 13:20:15.457149