diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 3782d72..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,16 +0,0 @@ -* collective.volto.stickyblocks version: -* Plone Version: -* Python version: -* Operating System: Linux - -### Description - -Describe what you were trying to get done. -Tell us what happened, what went wrong, and what you expected to happen. - -### What I Did - -``` -Paste the command(s) you ran and the output. -If there was a crash, please include the traceback here. -``` diff --git a/.github/workflows/plone-package.yml b/.github/workflows/plone-package.yml deleted file mode 100644 index 9cc2434..0000000 --- a/.github/workflows/plone-package.yml +++ /dev/null @@ -1,65 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Plone package - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - plone-version: - - 'Plone52' - - 'Plone60' - python-version: [3.7, 3.8, 3.9] - - steps: - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: | - ~/.cache/pip - ~/buildout-cache - ~/extends - key: ${{ runner.os }}-tox-${{ matrix.python-version }}-${{ matrix.plone-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/*.cfg') }}-${{ hashFiles('**/constraints.txt') }}-${{ hashFiles('**/tox.ini') }} - #restore-keys: | - # ${{ runner.os }}-tox- - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: setup buildout cache - run: | - mkdir -p ~/buildout-cache/{eggs,downloads} - mkdir ~/.buildout - echo "[buildout]" > $HOME/.buildout/default.cfg - echo "download-cache = $HOME/buildout-cache/downloads" >> $HOME/.buildout/default.cfg - echo "eggs-directory = $HOME/buildout-cache/eggs" >> $HOME/.buildout/default.cfg - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox tox-gh-actions - - name: Black-Check - run: | - tox -r -e black-check - - name: Test with tox - run: | - tox -r - env: - PLONE-VERSION: ${{ matrix.plone-version }} - PYTHON-VERSION: ${{ matrix.python-version }} - - name: "Upload coverage to Codecov" - uses: "codecov/codecov-action@v3" - with: - fail_ci_if_error: true - if: matrix.python-version == '3.7' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..baf7cce --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: Tests + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python: ["3.7"] + plone: ["52"] + # exclude: + # - python: "3.7" + # plone: "51" + steps: + - uses: actions/checkout@v1 + - name: Cache eggs + uses: actions/cache@v1 + with: + path: eggs + key: ${{ runner.OS }}-build-python${{ matrix.python }}-${{ matrix.plone }} + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python }} + - name: Install dependencies + run: | + pip install -r requirements.txt -c constraints_plone${{ matrix.plone }}.txt + cp test_plone${{ matrix.plone }}.cfg buildout.cfg + - name: Install buildout + run: | + buildout -N -t 3 code-analysis:return-status-codes=True + - name: Run tests + run: | + bin/code-analysis + bin/test diff --git a/base.cfg b/base.cfg index 1fef4b9..93d3abc 100644 --- a/base.cfg +++ b/base.cfg @@ -6,8 +6,7 @@ extensions = parts = instance test -# we use tox for testing and linting, by default -# code-analysis + code-analysis coverage test-coverage createcoverage @@ -37,10 +36,10 @@ recipe = collective.recipe.vscode eggs = ${instance:eggs} autocomplete-use-omelette = True -# [code-analysis] -# recipe = plone.recipe.codeanalysis -# directory = ${buildout:directory}/src/collective.volto -# return-status-codes = False +[code-analysis] +recipe = plone.recipe.codeanalysis +directory = ${buildout:directory}/src/collective.volto +return-status-codes = False [omelette]