-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from RegioneER/plone6_volto
Plone6 and volto compatibility
- Loading branch information
Showing
81 changed files
with
2,101 additions
and
3,794 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,54 @@ | ||
[*] | ||
indent_style = space | ||
# Generated from: | ||
# https://github.com/plone/meta/tree/master/config/default | ||
# See the inline comments on how to expand/tweak this configuration file | ||
# | ||
# EditorConfig Configuration file, for more details see: | ||
# http://EditorConfig.org | ||
# EditorConfig is a convention description, that could be interpreted | ||
# by multiple editors to enforce common coding conventions for specific | ||
# file types | ||
|
||
# top-most EditorConfig file: | ||
# Will ignore other EditorConfig files in Home directory or upper tree level. | ||
root = true | ||
|
||
|
||
[*] # For All Files | ||
# Unix-style newlines with a newline ending every file | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
# Set default charset | ||
charset = utf-8 | ||
# Indent style default | ||
indent_style = space | ||
# Max Line Length - a hard line wrap, should be disabled | ||
max_line_length = off | ||
|
||
[{*.py,*.cfg}] | ||
[*.{py,cfg,ini}] | ||
# 4 space indentation | ||
indent_size = 4 | ||
|
||
[{*.html,*.dtml,*.pt,*.zpt,*.xml,*.zcml,*.js}] | ||
[*.{yml,zpt,pt,dtml,zcml}] | ||
# 2 space indentation | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss,html}] # Frontend development | ||
# 2 space indentation | ||
indent_size = 2 | ||
max_line_length = 80 | ||
|
||
[{Makefile,.gitmodules}] | ||
# Tab indentation (no size specified, but view as 4 spaces) | ||
indent_style = tab | ||
indent_size = unset | ||
tab_width = unset | ||
|
||
|
||
## | ||
# Add extra configuration options in .meta.toml: | ||
# [editorconfig] | ||
# extra_lines = """ | ||
# _your own configuration lines_ | ||
# """ | ||
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Black | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.8] | ||
|
||
steps: | ||
# git checkout | ||
- uses: actions/checkout@v2 | ||
|
||
# python setup | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# python cache | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
# install black | ||
- name: install black | ||
run: pip install black | ||
|
||
# run black | ||
- name: run black | ||
run: black src/ --check --diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Flake8 | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.8] | ||
|
||
steps: | ||
# git checkout | ||
- uses: actions/checkout@v2 | ||
|
||
# python setup | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# python cache | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
# install flake8 | ||
- name: install flake8 | ||
run: pip install flake8 | ||
|
||
# run black | ||
- name: run flake8 | ||
run: flake8 src/ setup.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Pyroma | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.8] | ||
|
||
steps: | ||
# git checkout | ||
- uses: actions/checkout@v2 | ||
|
||
# python setup | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# python cache | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
# install pyroma | ||
- name: install pyroma | ||
run: pip install pyroma | ||
|
||
# run pyroma | ||
- name: run pyroma | ||
run: pyroma -n 10 -d . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,67 @@ | ||
name: Tests | ||
|
||
on: [push] | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
- '**.rst' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python: ['3.7'] | ||
plone: ['52'] | ||
python: ["3.8", "3.9", "3.10", "3.11"] | ||
plone: ["52", "60"] | ||
tz: ["UTC", "Europe/Rome"] | ||
exclude: | ||
- python: '3.7' | ||
plone: '51' | ||
- python: "3.10" | ||
plone: "52" | ||
- python: "3.11" | ||
plone: "52" | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v3 | ||
- name: Cache eggs | ||
uses: actions/cache@v1 | ||
uses: actions/cache@v3 | ||
with: | ||
path: eggs | ||
key: ${{ runner.OS }}-build-python${{ matrix.python }}-${{ matrix.plone }} | ||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v1 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements.txt -c constraints_plone${{ matrix.plone }}.txt | ||
pip install setuptools==40.8.0 | ||
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 | ||
buildout -N code-analysis:return-status-codes=True | ||
- name: Code analysis | ||
run: | | ||
bin/code-analysis | ||
bin/test | ||
- name: Run tests | ||
run: | | ||
bin/test-coverage | ||
env: | ||
PROXY_BEARER_AUTH: on | ||
TZ: ${{ matrix.tz }} | ||
- name: Upload coverage data to coveralls.io | ||
run: | | ||
pip install coveralls | ||
coveralls --service=github | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_FLAG_NAME: py${{ matrix.python }}-plone${{ matrix.plone }}-tz${{ matrix.tz }} | ||
COVERALLS_PARALLEL: true | ||
|
||
coveralls_finish: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Finished | ||
run: | | ||
pip install --upgrade coveralls | ||
coveralls --service=github --finish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: zpretty | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.8] | ||
|
||
steps: | ||
# git checkout | ||
- uses: actions/checkout@v2 | ||
|
||
# python setup | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# python cache | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
# install zpretty | ||
- name: install zpretty | ||
run: pip install zpretty | ||
|
||
# run zpretty | ||
- name: run zpretty | ||
run: find src -name '*.zcml' | xargs zpretty -i | ||
|
||
# XXX: this doesn't work on gh actions (https://github.com/plone/plone.restapi/pull/1119/checks?check_run_id=2686474411) | ||
# run git diff | ||
- name: run git diff | ||
run: git diff --exit-code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.