-
-
Notifications
You must be signed in to change notification settings - Fork 171
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 #260 from tegin/12.0-gh
[UPD] Update from template
- Loading branch information
Showing
12 changed files
with
391 additions
and
208 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Do NOT update manually; changes here will be overwritten by Copier | ||
_commit: v1.16.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: false | ||
github_ci_extra_env: {} | ||
github_enable_codecov: true | ||
github_enable_makepot: true | ||
github_enable_stale_action: true | ||
github_enforce_dev_status_compatibility: true | ||
include_wkhtmltopdf: false | ||
odoo_test_flavor: OCB | ||
odoo_version: 12.0 | ||
org_name: Odoo Community Association (OCA) | ||
org_slug: OCA | ||
rebel_module_groups: [] | ||
repo_description: Document Management System | ||
repo_name: DMS for Odoo | ||
repo_slug: dms | ||
repo_website: https://github.com/OCA/dms | ||
travis_apt_packages: [] | ||
travis_apt_sources: [] | ||
|
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,10 +1,11 @@ | ||
[flake8] | ||
max-line-length = 80 | ||
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 | ||
# 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 | ||
|
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,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@v3 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.6" | ||
- 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 |
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,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. |
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,68 @@ | ||
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@v3 | ||
- 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-ocb12.0:latest | ||
name: test with OCB | ||
makepot: "true" | ||
services: | ||
postgres: | ||
image: postgres:9.6 | ||
env: | ||
POSTGRES_USER: odoo | ||
POSTGRES_PASSWORD: odoo | ||
POSTGRES_DB: odoo | ||
ports: | ||
- 5432:5432 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- name: Install addons and dependencies | ||
run: oca_install_addons | ||
- name: Check licenses | ||
run: manifestoo -d . check-licenses | ||
continue-on-error: true | ||
- name: Check development status | ||
run: manifestoo -d . check-dev-status --default-dev-status=Beta | ||
- 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 == 'OCA' }} |
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 |
---|---|---|
|
@@ -15,7 +15,6 @@ build/ | |
develop-eggs/ | ||
dist/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
|
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.