mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 02:08:36 +00:00
Merge pull request #420 from camptocamp/12.0-ci-to-gha
[12.0] Change CI to GitHub actions
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
# Do NOT update manually; changes here will be overwritten by Copier
|
||||||
|
_commit: v1.14.1
|
||||||
|
_src_path: https://github.com/OCA/oca-addons-repo-template.git
|
||||||
|
ci: GitHub
|
||||||
|
dependency_installation_mode: PIP
|
||||||
|
generate_requirements_txt: true
|
||||||
|
github_check_license: true
|
||||||
|
github_ci_extra_env: {}
|
||||||
|
github_enable_codecov: true
|
||||||
|
github_enable_makepot: true
|
||||||
|
github_enable_stale_action: true
|
||||||
|
github_enforce_dev_status_compatibility: false
|
||||||
|
include_wkhtmltopdf: false
|
||||||
|
odoo_version: 12.0
|
||||||
|
org_name: Camptocamp
|
||||||
|
org_slug: camptocamp
|
||||||
|
rebel_module_groups:
|
||||||
|
- cloud_platform_exoscale
|
||||||
|
- cloud_platform_ovh
|
||||||
|
repo_description: null
|
||||||
|
repo_name: Odoo Cloud Addons
|
||||||
|
repo_slug: odoo-cloud-platform
|
||||||
|
repo_website: https://github.com/camptocamp/odoo-cloud-platform
|
||||||
|
travis_apt_packages: []
|
||||||
|
travis_apt_sources: []
|
||||||
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# Configuration for known file extensions
|
||||||
|
[*.{css,js,json,less,md,py,rst,sass,scss,xml,yaml,yml}]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.{json,yml,yaml,rst,md}]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
# Do not configure editor for libs and autogenerated content
|
||||||
|
[{*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst}]
|
||||||
|
charset = unset
|
||||||
|
end_of_line = unset
|
||||||
|
indent_size = unset
|
||||||
|
indent_style = unset
|
||||||
|
insert_final_newline = false
|
||||||
|
trim_trailing_whitespace = false
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
[flake8]
|
||||||
|
# E123,E133,E226,E241,E242 are ignored by default by pep8 and flake8
|
||||||
|
# F811 is legal in odoo 8 when we implement 2 interfaces for a method
|
||||||
|
# F601 pylint support this case with expected tests
|
||||||
|
# W503 changed by W504 and OCA prefers allow both
|
||||||
|
# E203: whitespace before ':' (black behaviour and not pep8 compliant)
|
||||||
|
ignore = E123,E133,E226,E241,E242,F811,F601,W503,W504,E203
|
||||||
|
max-line-length = 88
|
||||||
|
per-file-ignores=
|
||||||
|
__init__.py:F401
|
||||||
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
name: pre-commit
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "12.0*"
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "12.0"
|
||||||
|
- "12.0-ocabot-*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pre-commit:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: "3.7"
|
||||||
|
- name: Get python version
|
||||||
|
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||||
|
- uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pre-commit
|
||||||
|
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||||
|
- name: Install pre-commit
|
||||||
|
run: pip install pre-commit
|
||||||
|
- name: Run pre-commit
|
||||||
|
run: pre-commit run --all-files --show-diff-on-failure --color=always
|
||||||
|
- name: Check that all files generated by pre-commit are in git
|
||||||
|
run: |
|
||||||
|
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
|
||||||
|
if [ "$newfiles" != "" ] ; then
|
||||||
|
echo "Please check-in the following files:"
|
||||||
|
echo "$newfiles"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
name: Mark stale issues and pull requests
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 12 * * 0"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Stale PRs and issues policy
|
||||||
|
uses: actions/stale@v4
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# General settings.
|
||||||
|
ascending: true
|
||||||
|
remove-stale-when-updated: true
|
||||||
|
# Pull Requests settings.
|
||||||
|
# 120+30 day stale policy for PRs
|
||||||
|
# * Except PRs marked as "no stale"
|
||||||
|
days-before-pr-stale: 120
|
||||||
|
days-before-pr-close: 30
|
||||||
|
exempt-pr-labels: "no stale"
|
||||||
|
stale-pr-label: "stale"
|
||||||
|
stale-pr-message: >
|
||||||
|
There hasn't been any activity on this pull request in the past 4 months, so
|
||||||
|
it has been marked as stale and it will be closed automatically if no
|
||||||
|
further activity occurs in the next 30 days.
|
||||||
|
|
||||||
|
If you want this PR to never become stale, please ask a PSC member to apply
|
||||||
|
the "no stale" label.
|
||||||
|
# Issues settings.
|
||||||
|
# 180+30 day stale policy for open issues
|
||||||
|
# * Except Issues marked as "no stale"
|
||||||
|
days-before-issue-stale: 180
|
||||||
|
days-before-issue-close: 30
|
||||||
|
exempt-issue-labels: "no stale,needs more information"
|
||||||
|
stale-issue-label: "stale"
|
||||||
|
stale-issue-message: >
|
||||||
|
There hasn't been any activity on this issue in the past 6 months, so it has
|
||||||
|
been marked as stale and it will be closed automatically if no further
|
||||||
|
activity occurs in the next 30 days.
|
||||||
|
|
||||||
|
If you want this issue to never become stale, please ask a PSC member to
|
||||||
|
apply the "no stale" label.
|
||||||
|
|
||||||
|
# 15+30 day stale policy for issues pending more information
|
||||||
|
# * Issues that are pending more information
|
||||||
|
# * Except Issues marked as "no stale"
|
||||||
|
- name: Needs more information stale issues policy
|
||||||
|
uses: actions/stale@v4
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
ascending: true
|
||||||
|
only-labels: "needs more information"
|
||||||
|
exempt-issue-labels: "no stale"
|
||||||
|
days-before-stale: 15
|
||||||
|
days-before-close: 30
|
||||||
|
days-before-pr-stale: -1
|
||||||
|
days-before-pr-close: -1
|
||||||
|
remove-stale-when-updated: true
|
||||||
|
stale-issue-label: "stale"
|
||||||
|
stale-issue-message: >
|
||||||
|
This issue needs more information and there hasn't been any activity
|
||||||
|
recently, so it has been marked as stale and it will be closed automatically
|
||||||
|
if no further activity occurs in the next 30 days.
|
||||||
|
|
||||||
|
If you think this is a mistake, please ask a PSC member to remove the "needs
|
||||||
|
more information" label.
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
name: tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "12.0*"
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "12.0"
|
||||||
|
- "12.0-ocabot-*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
unreleased-deps:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Detect unreleased dependencies
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: |
|
||||||
|
for reqfile in requirements.txt test-requirements.txt ; do
|
||||||
|
if [ -f ${reqfile} ] ; then
|
||||||
|
result=0
|
||||||
|
# reject non-comment lines that contain a / (i.e. URLs, relative paths)
|
||||||
|
grep "^[^#].*/" ${reqfile} || result=$?
|
||||||
|
if [ $result -eq 0 ] ; then
|
||||||
|
echo "Unreleased dependencies found in ${reqfile}."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
container: ${{ matrix.container }}
|
||||||
|
name: ${{ matrix.name }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- container: ghcr.io/oca/oca-ci/py3.6-odoo12.0:latest
|
||||||
|
include: "cloud_platform_exoscale"
|
||||||
|
makepot: "true"
|
||||||
|
name: test exoscale with Odoo
|
||||||
|
- container: ghcr.io/oca/oca-ci/py3.6-ocb12.0:latest
|
||||||
|
include: "cloud_platform_exoscale"
|
||||||
|
name: test exoscale with OCB
|
||||||
|
- container: ghcr.io/oca/oca-ci/py3.6-odoo12.0:latest
|
||||||
|
include: "cloud_platform_ovh"
|
||||||
|
makepot: "true"
|
||||||
|
name: test ovh with Odoo
|
||||||
|
- container: ghcr.io/oca/oca-ci/py3.6-ocb12.0:latest
|
||||||
|
include: "cloud_platform_ovh"
|
||||||
|
name: test ovh with OCB
|
||||||
|
- container: ghcr.io/oca/oca-ci/py3.6-odoo12.0:latest
|
||||||
|
exclude: "cloud_platform_exoscale,cloud_platform_ovh"
|
||||||
|
makepot: "true"
|
||||||
|
name: test others with Odoo
|
||||||
|
- container: ghcr.io/oca/oca-ci/py3.6-ocb12.0:latest
|
||||||
|
exclude: "cloud_platform_exoscale,cloud_platform_ovh"
|
||||||
|
name: test others with OCB
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:9.6
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: odoo
|
||||||
|
POSTGRES_PASSWORD: odoo
|
||||||
|
POSTGRES_DB: odoo
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
env:
|
||||||
|
INCLUDE: "${{ matrix.include }}"
|
||||||
|
EXCLUDE: "${{ matrix.exclude }}"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Install addons and dependencies
|
||||||
|
run: oca_install_addons
|
||||||
|
- name: Check licenses
|
||||||
|
run: manifestoo -d . check-licenses
|
||||||
|
- name: Check development status
|
||||||
|
run: manifestoo -d . check-dev-status --default-dev-status=Beta
|
||||||
|
continue-on-error: true
|
||||||
|
- name: Initialize test db
|
||||||
|
run: oca_init_test_database
|
||||||
|
- name: Run tests
|
||||||
|
run: oca_run_tests
|
||||||
|
- uses: codecov/codecov-action@v1
|
||||||
|
- name: Update .pot files
|
||||||
|
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
|
||||||
|
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'camptocamp' }}
|
||||||
+20
-3
@@ -1,6 +1,8 @@
|
|||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
/.venv
|
||||||
|
/.pytest_cache
|
||||||
|
|
||||||
# C extensions
|
# C extensions
|
||||||
*.so
|
*.so
|
||||||
@@ -13,8 +15,6 @@ build/
|
|||||||
develop-eggs/
|
develop-eggs/
|
||||||
dist/
|
dist/
|
||||||
eggs/
|
eggs/
|
||||||
.eggs/
|
|
||||||
lib/
|
|
||||||
lib64/
|
lib64/
|
||||||
parts/
|
parts/
|
||||||
sdist/
|
sdist/
|
||||||
@@ -22,6 +22,7 @@ var/
|
|||||||
*.egg-info/
|
*.egg-info/
|
||||||
.installed.cfg
|
.installed.cfg
|
||||||
*.egg
|
*.egg
|
||||||
|
*.eggs
|
||||||
|
|
||||||
# Installer logs
|
# Installer logs
|
||||||
pip-log.txt
|
pip-log.txt
|
||||||
@@ -41,6 +42,19 @@ coverage.xml
|
|||||||
# Pycharm
|
# Pycharm
|
||||||
.idea
|
.idea
|
||||||
|
|
||||||
|
# Eclipse
|
||||||
|
.settings
|
||||||
|
|
||||||
|
# Visual Studio cache/options directory
|
||||||
|
.vs/
|
||||||
|
.vscode
|
||||||
|
|
||||||
|
# OSX Files
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
|
||||||
# Mr Developer
|
# Mr Developer
|
||||||
.mr.developer.cfg
|
.mr.developer.cfg
|
||||||
.project
|
.project
|
||||||
@@ -50,8 +64,11 @@ coverage.xml
|
|||||||
.ropeproject
|
.ropeproject
|
||||||
|
|
||||||
# Sphinx documentation
|
# Sphinx documentation
|
||||||
connector/doc/_build/
|
docs/_build/
|
||||||
|
|
||||||
# Backup files
|
# Backup files
|
||||||
*~
|
*~
|
||||||
*.swp
|
*.swp
|
||||||
|
|
||||||
|
# OCA rules
|
||||||
|
!static/lib/
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
exclude: |
|
||||||
|
(?x)
|
||||||
|
# NOT INSTALLABLE ADDONS
|
||||||
|
# END NOT INSTALLABLE ADDONS
|
||||||
|
# Files and folders generated by bots, to avoid loops
|
||||||
|
^setup/|/static/description/index\.html$|
|
||||||
|
# We don't want to mess with tool-generated files
|
||||||
|
.svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|
|
||||||
|
# Maybe reactivate this when all README files include prettier ignore tags?
|
||||||
|
^README\.md$|
|
||||||
|
# Library files can have extraneous formatting (even minimized)
|
||||||
|
/static/(src/)?lib/|
|
||||||
|
# Repos using Sphinx to generate docs don't need prettying
|
||||||
|
^docs/_templates/.*\.html$|
|
||||||
|
# You don't usually want a bot to modify your legal texts
|
||||||
|
(LICENSE.*|COPYING.*)
|
||||||
|
default_language_version:
|
||||||
|
python: python3.7
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/oca/maintainer-tools
|
||||||
|
rev: ab1d7f6
|
||||||
|
hooks:
|
||||||
|
# update the NOT INSTALLABLE ADDONS section above
|
||||||
|
- id: oca-update-pre-commit-excluded-addons
|
||||||
|
- id: oca-fix-manifest-website
|
||||||
|
args: ["https://github.com/camptocamp/odoo-cloud-platform"]
|
||||||
|
- repo: https://github.com/acsone/setuptools-odoo
|
||||||
|
rev: 3.1.8
|
||||||
|
hooks:
|
||||||
|
- id: setuptools-odoo-make-default
|
||||||
|
#- id: setuptools-odoo-get-requirements
|
||||||
|
#args:
|
||||||
|
#- --output
|
||||||
|
#- requirements.txt
|
||||||
|
#- --header
|
||||||
|
#- "# generated from manifests external_dependencies"
|
||||||
|
- repo: https://github.com/PyCQA/flake8
|
||||||
|
rev: 5.0.4
|
||||||
|
hooks:
|
||||||
|
- id: flake8
|
||||||
|
name: flake8 excluding __init__.py
|
||||||
|
exclude: __init__\.py
|
||||||
|
- repo: https://github.com/OCA/pylint-odoo
|
||||||
|
rev: v8.0.19
|
||||||
|
hooks:
|
||||||
|
- id: pylint_odoo
|
||||||
|
name: pylint with optional checks
|
||||||
|
args:
|
||||||
|
- --rcfile=.pylintrc
|
||||||
|
- --exit-zero
|
||||||
|
verbose: true
|
||||||
|
additional_dependencies: &pylint_deps
|
||||||
|
- pylint-odoo==v8.0.19
|
||||||
|
- id: pylint_odoo
|
||||||
|
name: pylint with mandatory checks
|
||||||
|
args:
|
||||||
|
- --rcfile=.pylintrc-mandatory
|
||||||
|
additional_dependencies: *pylint_deps
|
||||||
|
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
[MASTER]
|
||||||
|
load-plugins=pylint_odoo
|
||||||
|
score=n
|
||||||
|
|
||||||
|
[ODOOLINT]
|
||||||
|
readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
|
||||||
|
manifest_required_authors=Camptocamp
|
||||||
|
manifest_required_keys=license
|
||||||
|
manifest_deprecated_keys=description,active
|
||||||
|
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
|
||||||
|
valid_odoo_versions=12.0
|
||||||
|
|
||||||
|
[MESSAGES CONTROL]
|
||||||
|
disable=all
|
||||||
|
|
||||||
|
# Enable message and code:
|
||||||
|
# anomalous-backslash-in-string - W1401
|
||||||
|
# assignment-from-none - W1111
|
||||||
|
# dangerous-default-value - W0102
|
||||||
|
# duplicate-key - W0109
|
||||||
|
# missing-import-error - W7935
|
||||||
|
# missing-manifest-dependency - W7936
|
||||||
|
# pointless-statement - W0104
|
||||||
|
# pointless-string-statement - W0105
|
||||||
|
# print-statement - E1601
|
||||||
|
# redundant-keyword-arg - E1124
|
||||||
|
# reimported - W0404
|
||||||
|
# relative-import - W0403
|
||||||
|
# return-in-init - E0101
|
||||||
|
# rst-syntax-error - E7901
|
||||||
|
# too-few-format-args - E1306
|
||||||
|
# unreachable - W0101
|
||||||
|
|
||||||
|
|
||||||
|
# This .pylintrc contains optional AND mandatory checks and is meant to be
|
||||||
|
# loaded in an IDE to have it check everything, in the hope this will make
|
||||||
|
# optional checks more visible to contributors who otherwise never look at a
|
||||||
|
# green travis to see optional checks that failed.
|
||||||
|
# .pylintrc-mandatory containing only mandatory checks is used the pre-commit
|
||||||
|
# config as a blocking check.
|
||||||
|
|
||||||
|
# Beta message and code:
|
||||||
|
# api-one-deprecated - W8104
|
||||||
|
# api-one-multi-together - W8101
|
||||||
|
# attribute-deprecated - W8105
|
||||||
|
# class-camelcase - C8104
|
||||||
|
# create-user-wo-reset-password - W7905
|
||||||
|
# consider-merging-classes-inherited - R7980
|
||||||
|
# copy-wo-api-one - W8102
|
||||||
|
# dangerous-filter-wo-user - W7901
|
||||||
|
# dangerous-view-replace-wo-priority - W7940
|
||||||
|
# deprecated-module - W0402
|
||||||
|
# duplicate-id-csv - W7906
|
||||||
|
# duplicate-xml-fields - W7907
|
||||||
|
# duplicate-xml-record-id - W7902
|
||||||
|
# file-not-used - W7930
|
||||||
|
# incoherent-interpreter-exec-perm - W8201
|
||||||
|
# invalid-commit - E8102
|
||||||
|
# javascript-lint - W7903
|
||||||
|
# manifest-deprecated-key - C8103
|
||||||
|
# method-compute - C8108
|
||||||
|
# method-inverse - C8110
|
||||||
|
# method-required-super - W8106
|
||||||
|
# method-search - C8109
|
||||||
|
# missing-newline-extrafiles - W7908
|
||||||
|
# missing-readme - C7902
|
||||||
|
# no-utf8-coding-comment - C8201
|
||||||
|
# unnecessary-utf8-coding-comment - C8202
|
||||||
|
# odoo-addons-relative-import - W7950
|
||||||
|
# old-api7-method-defined - R8110
|
||||||
|
# openerp-exception-warning - R8101
|
||||||
|
# redundant-modulename-xml - W7909
|
||||||
|
# sql-injection - E8103
|
||||||
|
# too-complex - C0901
|
||||||
|
# translation-field - W8103
|
||||||
|
# translation-required - C8107
|
||||||
|
# use-vim-comment - W8202
|
||||||
|
# wrong-tabs-instead-of-spaces - W7910
|
||||||
|
# xml-syntax-error - E7902
|
||||||
|
|
||||||
|
|
||||||
|
enable=anomalous-backslash-in-string,
|
||||||
|
assignment-from-none,
|
||||||
|
dangerous-default-value,
|
||||||
|
development-status-allowed,
|
||||||
|
duplicate-key,
|
||||||
|
duplicate-po-message-definition,
|
||||||
|
missing-import-error,
|
||||||
|
missing-manifest-dependency,
|
||||||
|
po-msgstr-variables,
|
||||||
|
po-syntax-error,
|
||||||
|
pointless-statement,
|
||||||
|
pointless-string-statement,
|
||||||
|
print-used,
|
||||||
|
redundant-keyword-arg,
|
||||||
|
reimported,
|
||||||
|
relative-import,
|
||||||
|
return-in-init,
|
||||||
|
rst-syntax-error,
|
||||||
|
too-few-format-args,
|
||||||
|
unreachable,
|
||||||
|
eval-used,
|
||||||
|
eval-referenced,
|
||||||
|
license-allowed,
|
||||||
|
manifest-author-string,
|
||||||
|
manifest-required-author,
|
||||||
|
manifest-required-key,
|
||||||
|
manifest-version-format,
|
||||||
|
api-one-deprecated,
|
||||||
|
api-one-multi-together,
|
||||||
|
attribute-deprecated,
|
||||||
|
class-camelcase,
|
||||||
|
create-user-wo-reset-password,
|
||||||
|
consider-merging-classes-inherited,
|
||||||
|
copy-wo-api-one,
|
||||||
|
dangerous-filter-wo-user,
|
||||||
|
dangerous-view-replace-wo-priority,
|
||||||
|
deprecated-module,
|
||||||
|
duplicate-id-csv,
|
||||||
|
duplicate-po-message-definition,
|
||||||
|
duplicate-xml-fields,
|
||||||
|
duplicate-xml-record-id,
|
||||||
|
file-not-used,
|
||||||
|
incoherent-interpreter-exec-perm,
|
||||||
|
invalid-commit,
|
||||||
|
javascript-lint,
|
||||||
|
manifest-deprecated-key,
|
||||||
|
method-compute,
|
||||||
|
method-inverse,
|
||||||
|
method-required-super,
|
||||||
|
method-search,
|
||||||
|
missing-newline-extrafiles,
|
||||||
|
missing-readme,
|
||||||
|
po-msgstr-variables,
|
||||||
|
po-syntax-error,
|
||||||
|
no-utf8-coding-comment,
|
||||||
|
unnecessary-utf8-coding-comment,
|
||||||
|
odoo-addons-relative-import,
|
||||||
|
old-api7-method-defined,
|
||||||
|
openerp-exception-warning,
|
||||||
|
redefined-builtin,
|
||||||
|
redundant-modulename-xml,
|
||||||
|
sql-injection,
|
||||||
|
too-complex,
|
||||||
|
translation-field,
|
||||||
|
translation-required,
|
||||||
|
use-vim-comment,
|
||||||
|
wrong-tabs-instead-of-spaces,
|
||||||
|
xml-syntax-error,
|
||||||
|
|
||||||
|
|
||||||
|
[REPORTS]
|
||||||
|
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
|
||||||
|
output-format=colorized
|
||||||
|
reports=no
|
||||||
|
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
[MASTER]
|
||||||
|
load-plugins=pylint_odoo
|
||||||
|
score=n
|
||||||
|
|
||||||
|
[ODOOLINT]
|
||||||
|
readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
|
||||||
|
manifest_required_authors=Camptocamp
|
||||||
|
manifest_required_keys=license
|
||||||
|
manifest_deprecated_keys=description,active
|
||||||
|
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
|
||||||
|
valid_odoo_versions=12.0
|
||||||
|
|
||||||
|
[MESSAGES CONTROL]
|
||||||
|
disable=all
|
||||||
|
|
||||||
|
# Enable message and code:
|
||||||
|
# anomalous-backslash-in-string - W1401
|
||||||
|
# assignment-from-none - W1111
|
||||||
|
# dangerous-default-value - W0102
|
||||||
|
# duplicate-key - W0109
|
||||||
|
# missing-import-error - W7935
|
||||||
|
# missing-manifest-dependency - W7936
|
||||||
|
# pointless-statement - W0104
|
||||||
|
# pointless-string-statement - W0105
|
||||||
|
# print-statement - E1601
|
||||||
|
# redundant-keyword-arg - E1124
|
||||||
|
# reimported - W0404
|
||||||
|
# relative-import - W0403
|
||||||
|
# return-in-init - E0101
|
||||||
|
# rst-syntax-error - E7901
|
||||||
|
# too-few-format-args - E1306
|
||||||
|
# unreachable - W0101
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
enable=anomalous-backslash-in-string,
|
||||||
|
assignment-from-none,
|
||||||
|
dangerous-default-value,
|
||||||
|
development-status-allowed,
|
||||||
|
duplicate-key,
|
||||||
|
duplicate-po-message-definition,
|
||||||
|
missing-import-error,
|
||||||
|
missing-manifest-dependency,
|
||||||
|
po-msgstr-variables,
|
||||||
|
po-syntax-error,
|
||||||
|
pointless-statement,
|
||||||
|
pointless-string-statement,
|
||||||
|
print-used,
|
||||||
|
redundant-keyword-arg,
|
||||||
|
reimported,
|
||||||
|
relative-import,
|
||||||
|
return-in-init,
|
||||||
|
rst-syntax-error,
|
||||||
|
too-few-format-args,
|
||||||
|
unreachable,
|
||||||
|
eval-used,
|
||||||
|
eval-referenced,
|
||||||
|
license-allowed,
|
||||||
|
manifest-author-string,
|
||||||
|
manifest-required-author,
|
||||||
|
manifest-required-key,
|
||||||
|
manifest-version-format
|
||||||
|
|
||||||
|
[REPORTS]
|
||||||
|
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
|
||||||
|
output-format=colorized
|
||||||
|
reports=no
|
||||||
|
|
||||||
-42
@@ -1,42 +0,0 @@
|
|||||||
language: python
|
|
||||||
sudo: false
|
|
||||||
cache: pip
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- "/^[[:digit:]]{1,2}.[[:digit:]]$/"
|
|
||||||
|
|
||||||
python:
|
|
||||||
- "3.5"
|
|
||||||
|
|
||||||
addons:
|
|
||||||
postgresql: "9.5"
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- expect-dev # provides unbuffer utility
|
|
||||||
- python-lxml # because pip installation is slow
|
|
||||||
- python-simplejson
|
|
||||||
- python-serial
|
|
||||||
|
|
||||||
env:
|
|
||||||
matrix:
|
|
||||||
- LINT_CHECK="1"
|
|
||||||
- TESTS="1" ODOO_REPO="odoo/odoo" INCLUDE="cloud_platform_exoscale"
|
|
||||||
- TESTS="1" ODOO_REPO="OCA/OCB" INCLUDE="cloud_platform_exoscale"
|
|
||||||
- TESTS="1" ODOO_REPO="odoo/odoo" INCLUDE="cloud_platform_ovh"
|
|
||||||
- TESTS="1" ODOO_REPO="OCA/OCB" INCLUDE="cloud_platform_ovh"
|
|
||||||
- TESTS="1" ODOO_REPO="odoo/odoo" EXCLUDE="cloud_platform,cloud_platform_ovh,cloud_platform_exoscale,test_base_fileurl_field"
|
|
||||||
- TESTS="1" ODOO_REPO="OCA/OCB" EXCLUDE="cloud_platform,cloud_platform_ovh,cloud_platform_exoscale,test_base_fileurl_field"
|
|
||||||
global:
|
|
||||||
- VERSION="12.0" LINT_CHECK="0" TESTS="0"
|
|
||||||
|
|
||||||
install:
|
|
||||||
- git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
|
|
||||||
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
|
|
||||||
- travis_install_nightly
|
|
||||||
|
|
||||||
script:
|
|
||||||
- travis_run_tests
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- travis_after_test_success
|
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
"Open Source Integrators, "
|
"Open Source Integrators, "
|
||||||
"Serpent Consulting Services, "
|
"Serpent Consulting Services, "
|
||||||
"Odoo Community Association (OCA)",
|
"Odoo Community Association (OCA)",
|
||||||
|
"website": "https://github.com/camptocamp/odoo-cloud-platform",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"category": "Knowledge Management",
|
"category": "Knowledge Management",
|
||||||
"depends": ["base_attachment_object_storage"],
|
"depends": ["base_attachment_object_storage"],
|
||||||
@@ -18,7 +19,6 @@
|
|||||||
"azure.identity" # pip: azure-identity
|
"azure.identity" # pip: azure-identity
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"website": "https://github.com/camptocamp/odoo-cloud-platform",
|
|
||||||
"installable": True,
|
"installable": True,
|
||||||
"development_status": "Beta",
|
"development_status": "Beta",
|
||||||
"post_init_hook": "_post_init_hook",
|
"post_init_hook": "_post_init_hook",
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ class IrAttachment(models.Model):
|
|||||||
_inherit = "ir.attachment"
|
_inherit = "ir.attachment"
|
||||||
|
|
||||||
def _get_stores(self):
|
def _get_stores(self):
|
||||||
l = ["azure"]
|
stores = ["azure"]
|
||||||
l += super(IrAttachment, self)._get_stores()
|
stores += super(IrAttachment, self)._get_stores()
|
||||||
return l
|
return stores
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _get_blob_service_client(self):
|
def _get_blob_service_client(self):
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
'external_dependencies': {
|
'external_dependencies': {
|
||||||
'python': ['boto3'],
|
'python': ['boto3'],
|
||||||
},
|
},
|
||||||
'website': 'https://www.camptocamp.com',
|
'website': 'https://github.com/camptocamp/odoo-cloud-platform',
|
||||||
'data': [],
|
'data': [],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ class IrAttachment(models.Model):
|
|||||||
_inherit = "ir.attachment"
|
_inherit = "ir.attachment"
|
||||||
|
|
||||||
def _get_stores(self):
|
def _get_stores(self):
|
||||||
l = ['s3']
|
stores = ['s3']
|
||||||
l += super(IrAttachment, self)._get_stores()
|
stores += super(IrAttachment, self)._get_stores()
|
||||||
return l
|
return stores
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _get_s3_connection_params(self, bucket_name=None):
|
def _get_s3_connection_params(self, bucket_name=None):
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
'keystoneauth1',
|
'keystoneauth1',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'website': 'https://www.camptocamp.com',
|
'website': 'https://github.com/camptocamp/odoo-cloud-platform',
|
||||||
'data': [],
|
'data': [],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,9 +77,9 @@ class IrAttachment(models.Model):
|
|||||||
_inherit = 'ir.attachment'
|
_inherit = 'ir.attachment'
|
||||||
|
|
||||||
def _get_stores(self):
|
def _get_stores(self):
|
||||||
l = ['swift']
|
stores = ['swift']
|
||||||
l += super(IrAttachment, self)._get_stores()
|
stores += super(IrAttachment, self)._get_stores()
|
||||||
return l
|
return stores
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _get_swift_connection(self):
|
def _get_swift_connection(self):
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'category': 'Knowledge Management',
|
'category': 'Knowledge Management',
|
||||||
'depends': ['base'],
|
'depends': ['base'],
|
||||||
'website': 'http://www.camptocamp.com',
|
'website': 'https://github.com/camptocamp/odoo-cloud-platform',
|
||||||
'data': [
|
'data': [
|
||||||
'data/res_config_settings_data.xml',
|
'data/res_config_settings_data.xml',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"version": "12.0.1.0.0",
|
"version": "12.0.1.0.0",
|
||||||
"category": "Technical Settings",
|
"category": "Technical Settings",
|
||||||
'author': 'Camptocamp, Odoo Community Association (OCA)',
|
'author': 'Camptocamp, Odoo Community Association (OCA)',
|
||||||
|
"website": "https://github.com/camptocamp/odoo-cloud-platform",
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
"depends": [
|
"depends": [
|
||||||
"base_attachment_object_storage",
|
"base_attachment_object_storage",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
'logging_json',
|
'logging_json',
|
||||||
'server_environment', # OCA/server-tools
|
'server_environment', # OCA/server-tools
|
||||||
],
|
],
|
||||||
'website': 'https://www.camptocamp.com',
|
'website': 'https://github.com/camptocamp/odoo-cloud-platform',
|
||||||
'data': [],
|
'data': [],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
"cloud_platform_ovh",
|
"cloud_platform_ovh",
|
||||||
"cloud_platform_exoscale",
|
"cloud_platform_exoscale",
|
||||||
],
|
],
|
||||||
"website": "https://www.camptocamp.com",
|
"website": "https://github.com/camptocamp/odoo-cloud-platform",
|
||||||
"data": [],
|
"data": [],
|
||||||
"installable": True,
|
"installable": True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"excludes": [
|
"excludes": [
|
||||||
"cloud_platform_ovh",
|
"cloud_platform_ovh",
|
||||||
],
|
],
|
||||||
"website": "https://www.camptocamp.com",
|
"website": "https://github.com/camptocamp/odoo-cloud-platform",
|
||||||
"data": [],
|
"data": [],
|
||||||
"installable": True,
|
"installable": True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"excludes": [
|
"excludes": [
|
||||||
"cloud_platform_exoscale",
|
"cloud_platform_exoscale",
|
||||||
],
|
],
|
||||||
"website": "https://www.camptocamp.com",
|
"website": "https://github.com/camptocamp/odoo-cloud-platform",
|
||||||
"data": [],
|
"data": [],
|
||||||
"installable": True,
|
"installable": True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
'external_dependencies': {
|
'external_dependencies': {
|
||||||
'python': ['pythonjsonlogger'],
|
'python': ['pythonjsonlogger'],
|
||||||
},
|
},
|
||||||
'website': 'http://www.camptocamp.com',
|
'website': 'https://github.com/camptocamp/odoo-cloud-platform',
|
||||||
'data': [],
|
'data': [],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ class OdooJsonFormatter(jsonlogger.JsonFormatter):
|
|||||||
|
|
||||||
|
|
||||||
if is_true(os.environ.get('ODOO_LOGGING_JSON')):
|
if is_true(os.environ.get('ODOO_LOGGING_JSON')):
|
||||||
format = ('%(asctime)s %(pid)s %(levelname)s'
|
format_str = ('%(asctime)s %(pid)s %(levelname)s'
|
||||||
'%(dbname)s %(name)s: %(message)s')
|
'%(dbname)s %(name)s: %(message)s')
|
||||||
formatter = OdooJsonFormatter(format)
|
formatter = OdooJsonFormatter(format_str)
|
||||||
logging.getLogger().handlers[0].formatter = formatter
|
logging.getLogger().handlers[0].formatter = formatter
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'category': 'category',
|
'category': 'category',
|
||||||
'depends': ['base', 'web'],
|
'depends': ['base', 'web'],
|
||||||
'website': 'http://www.camptocamp.com',
|
'website': 'https://github.com/camptocamp/odoo-cloud-platform',
|
||||||
'data': [],
|
'data': [],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
"web",
|
"web",
|
||||||
"server_environment",
|
"server_environment",
|
||||||
],
|
],
|
||||||
"website": "http://www.camptocamp.com",
|
"website": "https://github.com/camptocamp/odoo-cloud-platform",
|
||||||
"data": [],
|
"data": [],
|
||||||
"external_dependencies": {
|
"external_dependencies": {
|
||||||
"python": ["prometheus_client"],
|
"python": ["prometheus_client"],
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
'web',
|
'web',
|
||||||
'server_environment',
|
'server_environment',
|
||||||
],
|
],
|
||||||
'website': 'http://www.camptocamp.com',
|
'website': 'https://github.com/camptocamp/odoo-cloud-platform',
|
||||||
'data': [],
|
'data': [],
|
||||||
'external_dependencies': {
|
'external_dependencies': {
|
||||||
'python': ['statsd'],
|
'python': ['statsd'],
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'category': 'category',
|
'category': 'category',
|
||||||
'depends': ['base', 'web'],
|
'depends': ['base', 'web'],
|
||||||
'website': 'http://www.camptocamp.com',
|
'website': 'https://github.com/camptocamp/odoo-cloud-platform',
|
||||||
'data': [],
|
'data': [],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
'external_dependencies': {
|
'external_dependencies': {
|
||||||
'python': ['redis'],
|
'python': ['redis'],
|
||||||
},
|
},
|
||||||
'website': 'http://www.camptocamp.com',
|
'website': 'https://github.com/camptocamp/odoo-cloud-platform',
|
||||||
'data': [],
|
'data': [],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'post_load': False,
|
'post_load': False,
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
'version': '12.0.1.0.0',
|
'version': '12.0.1.0.0',
|
||||||
'category': 'Tests',
|
'category': 'Tests',
|
||||||
'author': 'Camptocamp,Odoo Community Association (OCA)',
|
'author': 'Camptocamp,Odoo Community Association (OCA)',
|
||||||
|
'website': 'https://github.com/camptocamp/odoo-cloud-platform',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'depends': [
|
'depends': [
|
||||||
'base_fileurl_field'
|
'base_fileurl_field'
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ class IrAttachment(models.Model):
|
|||||||
_inherit = "ir.attachment"
|
_inherit = "ir.attachment"
|
||||||
|
|
||||||
def _get_stores(self):
|
def _get_stores(self):
|
||||||
l = ['s3']
|
stores = ['s3']
|
||||||
l += super(IrAttachment, self)._get_stores()
|
stores += super(IrAttachment, self)._get_stores()
|
||||||
return l
|
return stores
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _store_file_read(self, fname, bin_size=False):
|
def _store_file_read(self, fname, bin_size=False):
|
||||||
|
|||||||
Reference in New Issue
Block a user