Skip to content

Commit

Permalink
TA#66731 [ADD][16.0] Initiate branch
Browse files Browse the repository at this point in the history
  • Loading branch information
majouda committed Jun 25, 2024
1 parent 21ebd39 commit 21798ec
Show file tree
Hide file tree
Showing 77 changed files with 124 additions and 1,990 deletions.
57 changes: 27 additions & 30 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,30 @@ jobs:
name: Setup Log Folder For Reports
command: sudo mkdir -p .log && sudo chmod 777 .log

- run:
name: Run Test
command: docker-compose run --rm odoo run_pytest.sh
# - run:
# name: Run Test
# command: docker-compose run --rm odoo run_pytest.sh

- run:
name: Codacy Coverage
command: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l python -r .log/coverage.xml
- store_test_results:
path: .log
# - store_test_results:
# path: .log

# job that find the next tag for the current branch/repo and push the tag to github.
# it will trigger the publish of a new docker image.
auto-tag:
machine: true
steps:
- checkout
- run:
<<: *quay_io_login
- run:
name: Get nws
command: |
curl -L $NWS_BIN_LOCATION > ./nws
chmod +x ./nws
- run:
name: Set tag
command: |
./nws circleci create-tag -t odoo-base
# auto-tag:
# machine: true
# steps:
# - checkout
# - run:
# <<: *quay_io_login
# - run:
# name: Get nws
# command: |
# curl -L $NWS_BIN_LOCATION > ./nws
# chmod +x ./nws
# - run:
# name: Set tag
# command: |
# ./nws circleci create-tag -t odoo-base

workflows:
version: 2
Expand All @@ -56,10 +53,10 @@ workflows:
- tests:
context: quay.io

- auto-tag:
context: nws
requires:
- tests
filters:
branches:
only: /^1\d\.0/
# - auto-tag:
# context: nws
# requires:
# - tests
# filters:
# branches:
# only: /^1\d\.0/
2 changes: 1 addition & 1 deletion .docker_files/main/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# © 2022 Numigi
# © 2024 Numigi
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
6 changes: 2 additions & 4 deletions .docker_files/main/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# © 2022 Numigi
# © 2024 Numigi
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

{
Expand All @@ -11,9 +11,7 @@
'category': 'Other',
'summary': 'Install all addons required for testing.',
'depends': [
'survey_answer_for_partner', # TA#7643
# 'survey_condition',
'survey_type', # TA#4707
'survey',
],
'installable': True,
}
1 change: 0 additions & 1 deletion .docker_files/main/tests/__init__.py

This file was deleted.

17 changes: 0 additions & 17 deletions .docker_files/main/tests/test_installed_modules.py

This file was deleted.

2 changes: 1 addition & 1 deletion .docker_files/odoo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test_report_directory = False
translate_modules = ['all']
unaccent = False
without_demo = False
workers = 2
workers = 0
xmlrpc = True
xmlrpc_interface =
xmlrpc_port = 8069
Expand Down
Empty file.
12 changes: 12 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[flake8]
max-line-length = 88
max-complexity = 16
# B = bugbear
# B9 = bugbear opinionated (incl line length)
select = C,E,F,W,B,B9
# E203: whitespace before ':' (black behaviour)
# E501: flake8 line length (covered by bugbear B950)
# W503: line break before binary operator (black behaviour)
ignore = E203,E501,W503,F821
per-file-ignores=
__init__.py:F401
36 changes: 36 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: pre-commit

on:
pull_request:
branches:
- "16.0"
push:
branches:
- "16.0"

jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: "3.11"
- 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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ __pycache__/
Pipfile
docker-compose.override.yml
.DS_STORE
.third-party-addons
.pytest_cache
.vscode
30 changes: 30 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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$|
# Don't bother non-technical authors with formatting issues in docs
readme/.*\.(rst|md)$|
# Ignore build and dist directories in addons
/build/|/dist/|
# You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*)
default_language_version:
python: python3
node: "14.13.0"
repos:
- repo: https://github.com/PyCQA/flake8
rev: 3.8.3
hooks:
- id: flake8
name: flake8
additional_dependencies: ["flake8-bugbear==20.1.4"]
67 changes: 0 additions & 67 deletions .unported/survey_condition/README.rst

This file was deleted.

4 changes: 0 additions & 4 deletions .unported/survey_condition/__init__.py

This file was deleted.

22 changes: 0 additions & 22 deletions .unported/survey_condition/__manifest__.py

This file was deleted.

4 changes: 0 additions & 4 deletions .unported/survey_condition/controllers/__init__.py

This file was deleted.

Loading

0 comments on commit 21798ec

Please sign in to comment.