Skip to content

Commit f0be6a2

Browse files
[IMP] copier update
1 parent 2016047 commit f0be6a2

File tree

8 files changed

+174
-64
lines changed

8 files changed

+174
-64
lines changed

.copier-answers.yml

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
# Do NOT update manually; changes here will be overwritten by Copier
2-
_commit: v1.3.6.3
2+
_commit: v1.12.0
33
_src_path: https://github.com/Escodoo/oca-addons-repo-template.git
4-
ci: Travis
5-
dependency_installation_mode: OCA
4+
ci: GitHub
5+
dependency_installation_mode: PIP
66
generate_requirements_txt: true
7+
github_check_license: true
8+
github_enable_codecov: true
9+
github_enable_makepot: true
10+
github_enable_stale_action: true
11+
github_enforce_dev_status_compatibility: true
712
include_wkhtmltopdf: false
813
odoo_version: 14.0
14+
org_name: Escodoo
15+
org_slug: Escodoo
916
rebel_module_groups: []
10-
repo_description: Escodoo Account Addons
11-
repo_name: Escodoo Account Addons
17+
repo_description: 'TODO: add repo description.'
18+
repo_name: Account Addons
1219
repo_slug: account-addons
20+
repo_website: https://github.com/OCA/project
1321
travis_apt_packages: []
1422
travis_apt_sources: []

.eslintrc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ env:
44

55
# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
66
parserOptions:
7-
ecmaVersion: 2017
7+
ecmaVersion: 2019
88

99
overrides:
1010
- files:

.github/ISSUE_TEMPLATE/bug_report.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/pre-commit.yml

+22-7
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,34 @@ name: pre-commit
22

33
on:
44
pull_request:
5+
branches:
6+
- "14.0*"
57
push:
8+
branches:
9+
- "14.0"
10+
- "14.0-ocabot-*"
611

712
jobs:
813
pre-commit:
914
runs-on: ubuntu-latest
1015
steps:
1116
- uses: actions/checkout@v2
1217
- uses: actions/setup-python@v2
18+
- name: Get python version
19+
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
20+
- uses: actions/cache@v1
1321
with:
14-
# The pylint-odoo version we use here does not support python 3.10
15-
# https://github.com/OCA/oca-addons-repo-template/issues/80
16-
# We also need to pin to an older version of python for older odoo versions
17-
# where we are not using black > 21. Older black versions won't work with
18-
# Python 3.9.8+, and we can't bump black without reformatting.
19-
python-version: "3.9.7"
20-
- uses: pre-commit/[email protected]
22+
path: ~/.cache/pre-commit
23+
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
24+
- name: Install pre-commit
25+
run: pip install pre-commit
26+
- name: Run pre-commit
27+
run: pre-commit run --all-files --show-diff-on-failure --color=always
28+
- name: Check that all files generated by pre-commit are in git
29+
run: |
30+
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
31+
if [ "$newfiles" != "" ] ; then
32+
echo "Please check-in the following files:"
33+
echo "$newfiles"
34+
exit 1
35+
fi

.github/workflows/test.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "14.0*"
7+
push:
8+
branches:
9+
- "14.0"
10+
- "14.0-ocabot-*"
11+
12+
jobs:
13+
unreleased-deps:
14+
runs-on: ubuntu-latest
15+
name: Detect unreleased dependencies
16+
steps:
17+
- uses: actions/checkout@v2
18+
- run: |
19+
for reqfile in requirements.txt test-requirements.txt ; do
20+
if [ -f ${reqfile} ] ; then
21+
result=0
22+
# reject non-comment lines that contain a / (i.e. URLs, relative paths)
23+
grep "^[^#].*/" ${reqfile} || result=$?
24+
if [ $result -eq 0 ] ; then
25+
echo "Unreleased dependencies found in ${reqfile}."
26+
exit 1
27+
fi
28+
fi
29+
done
30+
test:
31+
runs-on: ubuntu-latest
32+
container: ${{ matrix.container }}
33+
name: ${{ matrix.name }}
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
include:
38+
- container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest
39+
makepot: "true"
40+
name: test with Odoo
41+
- container: ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest
42+
name: test with OCB
43+
services:
44+
postgres:
45+
image: postgres:9.6
46+
env:
47+
POSTGRES_USER: odoo
48+
POSTGRES_PASSWORD: odoo
49+
POSTGRES_DB: odoo
50+
ports:
51+
- 5432:5432
52+
steps:
53+
- uses: actions/checkout@v2
54+
with:
55+
persist-credentials: false
56+
- name: Install addons and dependencies
57+
run: oca_install_addons
58+
- name: Check licenses
59+
run: manifestoo -d . check-licenses
60+
- name: Check development status
61+
run: manifestoo -d . check-dev-status --default-dev-status=Beta
62+
- name: Initialize test db
63+
run: oca_init_test_database
64+
- name: Run tests
65+
run: oca_run_tests
66+
- uses: codecov/codecov-action@v1
67+
- name: Update .pot files
68+
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
69+
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }}

.pre-commit-config.yaml

+11-10
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ repos:
2727
entry: found forbidden files; remove them
2828
language: fail
2929
files: "\\.rej$"
30+
- id: en-po-files
31+
name: en.po files cannot exist
32+
entry: found a en.po file
33+
language: fail
34+
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
3035
- repo: https://github.com/oca/maintainer-tools
3136
rev: ab1d7f6
3237
hooks:
@@ -104,7 +109,7 @@ repos:
104109
- --settings=.
105110
exclude: /__init__\.py$
106111
- repo: https://github.com/acsone/setuptools-odoo
107-
rev: 2.6.0
112+
rev: 3.1.8
108113
hooks:
109114
- id: setuptools-odoo-make-default
110115
- id: setuptools-odoo-get-requirements
@@ -113,25 +118,21 @@ repos:
113118
- requirements.txt
114119
- --header
115120
- "# generated from manifests external_dependencies"
116-
- repo: https://gitlab.com/PyCQA/flake8
121+
- repo: https://github.com/PyCQA/flake8
117122
rev: 3.8.3
118123
hooks:
119124
- id: flake8
120125
name: flake8
121126
additional_dependencies: ["flake8-bugbear==20.1.4"]
122-
- repo: https://github.com/PyCQA/pylint
123-
rev: pylint-2.5.3
127+
- repo: https://github.com/OCA/pylint-odoo
128+
rev: 7.0.2
124129
hooks:
125-
- id: pylint
130+
- id: pylint_odoo
126131
name: pylint with optional checks
127132
args:
128133
- --rcfile=.pylintrc
129134
- --exit-zero
130135
verbose: true
131-
additional_dependencies: &pylint_deps
132-
- pylint-odoo==3.5.0
133-
- id: pylint
134-
name: pylint with mandatory checks
136+
- id: pylint_odoo
135137
args:
136138
- --rcfile=.pylintrc-mandatory
137-
additional_dependencies: *pylint_deps

.travis.yml

-41
This file was deleted.

0 commit comments

Comments
 (0)