Skip to content

Commit a6d6294

Browse files
authored
Merge branch 'gisce' into FIX_py2_inherits_mongo_when_unicode_literals
2 parents 32662c8 + 654866c commit a6d6294

File tree

9 files changed

+665
-77
lines changed

9 files changed

+665
-77
lines changed

.github/workflows/mongo3.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Mongodb Backend Tests (mongo3)
2+
3+
on:
4+
pull_request:
5+
types: [ labeled ]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.label.name || github.ref }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
12+
jobs:
13+
run-tests-3:
14+
if: github.event_name == 'pull_request' && github.event.label.name == 'to be merged'
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: [ "2.7", "3.11" ]
20+
erp-module: [ "mongodb_backend" ]
21+
services:
22+
postgres:
23+
image: timescale/timescaledb-ha:pg15-ts2.11-all
24+
env:
25+
POSTGRES_USER: erp
26+
POSTGRES_PASSWORD: erp
27+
options: >-
28+
--health-cmd pg_isready
29+
--health-interval 10s
30+
--health-timeout 5s
31+
--health-retries 5
32+
ports:
33+
- 127.0.0.1:5432:5432
34+
35+
redis:
36+
image: redis:5.0
37+
ports:
38+
- 127.0.0.1:6379:6379
39+
40+
mongo:
41+
image: mongo:3.0
42+
ports:
43+
- 127.0.0.1:27017:27017
44+
steps:
45+
- name: Checkout code (mongodb_backend)
46+
uses: actions/checkout@v4
47+
with:
48+
path: src/mongodb_backend
49+
50+
- name: Checkout code (oorq)
51+
uses: actions/checkout@v4
52+
with:
53+
path: src/oorq
54+
repository: gisce/oorq
55+
token: ${{ secrets.RO_GITHUB_ACTIONS_REPOS }}
56+
57+
- name: Checkout code (ERP)
58+
uses: actions/checkout@v4
59+
with:
60+
path: src/erp
61+
repository: gisce/erp
62+
token: ${{ secrets.RO_GITHUB_ACTIONS_REPOS }}
63+
64+
- name: Set up Python 3
65+
if: matrix.python-version != '2.7'
66+
uses: actions/setup-python@v5
67+
with:
68+
python-version: ${{ matrix.python-version }}
69+
70+
- name: Install Python 2
71+
if: matrix.python-version == '2.7'
72+
run: |
73+
sudo apt update
74+
sudo apt install python2 python2-dev python-pip
75+
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
76+
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2
77+
printf '1\n' | sudo update-alternatives --config python
78+
cd /usr/bin
79+
sudo ln -s /usr/bin/pip2 ./pip
80+
81+
- name: Install Requirements
82+
run: |
83+
pip install -r src/erp/requirements.txt
84+
pip install -r src/erp/requirements-dev.txt
85+
pip install -r src/erp/server/bin/addons/base/requirements.txt
86+
pip install -r src/oorq/requirements.txt
87+
pip install pymongo==3.13.0
88+
pip install destral
89+
90+
- name: Link addons
91+
run: |
92+
cd src/erp
93+
python tools/link_addons.py
94+
95+
- name: Run tests
96+
env:
97+
OPENERP_SECRET: shhhhhhhht
98+
OPENERP_REDIS_URL: redis://localhost:6379/0
99+
OPENERP_ROOT_PATH: ${{ github.workspace }}/src/erp/server/bin
100+
OPENERP_ADDONS_PATH: ${{ github.workspace }}/src/erp/server/bin/addons
101+
PYTHONPATH: ${{ github.workspace }}/src/erp/server/bin:${{ github.workspace }}/src/erp/server/bin/addons:${{ github.workspace }}/src/erp/server/sitecustomize
102+
OPENERP_DB_USER: erp
103+
OPENERP_DB_PASSWORD: erp
104+
OPENERP_DB_HOST: localhost
105+
106+
run: |
107+
destral --report-coverage --enable-coverage --report-junitxml ${{ github.workspace }}/report_tests -m ${{ matrix.erp-module }}
108+
109+
- name: Publish tests Results Mongo
110+
if: (success() || failure())
111+
uses: EnricoMi/publish-unit-test-result-action@v2
112+
with:
113+
junit_files: "report_tests/*.xml"
114+
check_name: "TestsResults_mongo3${{ matrix.python-version }}_${{ matrix.erp-module }}"
115+
comment_title: "Python Mongo 3 ${{ matrix.python-version }} Tests for ${{ matrix.erp-module }}"

.github/workflows/mongo5.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Mongodb Backend Tests (mongo5)
2+
3+
on:
4+
pull_request:
5+
types: [ labeled ]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.label.name || github.ref }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
12+
jobs:
13+
run-tests-5:
14+
if: github.event_name == 'pull_request' && github.event.label.name == 'to be merged'
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: [ "2.7", "3.11" ]
20+
erp-module: [ "mongodb_backend" ]
21+
services:
22+
postgres:
23+
image: timescale/timescaledb-ha:pg15-ts2.11-all
24+
env:
25+
POSTGRES_USER: erp
26+
POSTGRES_PASSWORD: erp
27+
options: >-
28+
--health-cmd pg_isready
29+
--health-interval 10s
30+
--health-timeout 5s
31+
--health-retries 5
32+
ports:
33+
- 127.0.0.1:5432:5432
34+
35+
redis:
36+
image: redis:5.0
37+
ports:
38+
- 127.0.0.1:6379:6379
39+
40+
mongo:
41+
image: mongo:5.0
42+
ports:
43+
- 127.0.0.1:27017:27017
44+
steps:
45+
- name: Checkout code (mongodb_backend)
46+
uses: actions/checkout@v4
47+
with:
48+
path: src/mongodb_backend
49+
50+
- name: Checkout code (oorq)
51+
uses: actions/checkout@v4
52+
with:
53+
path: src/oorq
54+
repository: gisce/oorq
55+
token: ${{ secrets.RO_GITHUB_ACTIONS_REPOS }}
56+
57+
- name: Checkout code (ERP)
58+
uses: actions/checkout@v4
59+
with:
60+
path: src/erp
61+
repository: gisce/erp
62+
token: ${{ secrets.RO_GITHUB_ACTIONS_REPOS }}
63+
64+
- name: Set up Python 3
65+
if: matrix.python-version != '2.7'
66+
uses: actions/setup-python@v5
67+
with:
68+
python-version: ${{ matrix.python-version }}
69+
70+
- name: Install Python 2
71+
if: matrix.python-version == '2.7'
72+
run: |
73+
sudo apt update
74+
sudo apt install python2 python2-dev python-pip
75+
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
76+
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2
77+
printf '1\n' | sudo update-alternatives --config python
78+
cd /usr/bin
79+
sudo ln -s /usr/bin/pip2 ./pip
80+
81+
- name: Install Requirements
82+
run: |
83+
pip install -r src/erp/requirements.txt
84+
pip install -r src/erp/requirements-dev.txt
85+
pip install -r src/erp/server/bin/addons/base/requirements.txt
86+
pip install -r src/oorq/requirements.txt
87+
pip install pymongo==3.13.0
88+
pip install destral
89+
90+
- name: Link addons
91+
run: |
92+
cd src/erp
93+
python tools/link_addons.py
94+
95+
- name: Run tests
96+
env:
97+
OPENERP_SECRET: shhhhhhhht
98+
OPENERP_REDIS_URL: redis://localhost:6379/0
99+
OPENERP_ROOT_PATH: ${{ github.workspace }}/src/erp/server/bin
100+
OPENERP_ADDONS_PATH: ${{ github.workspace }}/src/erp/server/bin/addons
101+
PYTHONPATH: ${{ github.workspace }}/src/erp/server/bin:${{ github.workspace }}/src/erp/server/bin/addons:${{ github.workspace }}/src/erp/server/sitecustomize
102+
OPENERP_DB_USER: erp
103+
OPENERP_DB_PASSWORD: erp
104+
OPENERP_DB_HOST: localhost
105+
106+
run: |
107+
destral --report-coverage --enable-coverage --report-junitxml ${{ github.workspace }}/report_tests -m ${{ matrix.erp-module }}
108+
109+
- name: Publish tests Results Mongo
110+
if: (success() || failure())
111+
uses: EnricoMi/publish-unit-test-result-action@v2
112+
with:
113+
junit_files: "report_tests/*.xml"
114+
check_name: "TestsResults_mongo5${{ matrix.python-version }}_${{ matrix.erp-module }}"
115+
comment_title: "Python Mongo 5 ${{ matrix.python-version }} Tests for ${{ matrix.erp-module }}"

.github/workflows/mongo8.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Mongodb Backend Tests (mongo8)
2+
3+
on:
4+
pull_request:
5+
types: [ labeled ]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.label.name || github.ref }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
12+
jobs:
13+
run-tests-8:
14+
if: github.event_name == 'pull_request' && github.event.label.name == 'to be merged'
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: [ "2.7", "3.11" ]
20+
erp-module: [ "mongodb_backend" ]
21+
services:
22+
postgres:
23+
image: timescale/timescaledb-ha:pg15-ts2.11-all
24+
env:
25+
POSTGRES_USER: erp
26+
POSTGRES_PASSWORD: erp
27+
options: >-
28+
--health-cmd pg_isready
29+
--health-interval 10s
30+
--health-timeout 5s
31+
--health-retries 5
32+
ports:
33+
- 127.0.0.1:5432:5432
34+
35+
redis:
36+
image: redis:5.0
37+
ports:
38+
- 127.0.0.1:6379:6379
39+
40+
mongo:
41+
image: mongo:8.0
42+
ports:
43+
- 127.0.0.1:27017:27017
44+
steps:
45+
- name: Checkout code (mongodb_backend)
46+
uses: actions/checkout@v4
47+
with:
48+
path: src/mongodb_backend
49+
50+
- name: Checkout code (oorq)
51+
uses: actions/checkout@v4
52+
with:
53+
path: src/oorq
54+
repository: gisce/oorq
55+
token: ${{ secrets.RO_GITHUB_ACTIONS_REPOS }}
56+
57+
- name: Checkout code (ERP)
58+
uses: actions/checkout@v4
59+
with:
60+
path: src/erp
61+
repository: gisce/erp
62+
token: ${{ secrets.RO_GITHUB_ACTIONS_REPOS }}
63+
64+
- name: Set up Python 3
65+
if: matrix.python-version != '2.7'
66+
uses: actions/setup-python@v5
67+
with:
68+
python-version: ${{ matrix.python-version }}
69+
70+
- name: Install Python 2
71+
if: matrix.python-version == '2.7'
72+
run: |
73+
sudo apt update
74+
sudo apt install python2 python2-dev python-pip
75+
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
76+
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2
77+
printf '1\n' | sudo update-alternatives --config python
78+
cd /usr/bin
79+
sudo ln -s /usr/bin/pip2 ./pip
80+
81+
- name: Install Requirements
82+
run: |
83+
pip install -r src/erp/requirements.txt
84+
pip install -r src/erp/requirements-dev.txt
85+
pip install -r src/erp/server/bin/addons/base/requirements.txt
86+
pip install -r src/oorq/requirements.txt
87+
pip install pymongo==3.13.0
88+
pip install destral
89+
90+
- name: Link addons
91+
run: |
92+
cd src/erp
93+
python tools/link_addons.py
94+
95+
- name: Run tests
96+
env:
97+
OPENERP_SECRET: shhhhhhhht
98+
OPENERP_REDIS_URL: redis://localhost:6379/0
99+
OPENERP_ROOT_PATH: ${{ github.workspace }}/src/erp/server/bin
100+
OPENERP_ADDONS_PATH: ${{ github.workspace }}/src/erp/server/bin/addons
101+
PYTHONPATH: ${{ github.workspace }}/src/erp/server/bin:${{ github.workspace }}/src/erp/server/bin/addons:${{ github.workspace }}/src/erp/server/sitecustomize
102+
OPENERP_DB_USER: erp
103+
OPENERP_DB_PASSWORD: erp
104+
OPENERP_DB_HOST: localhost
105+
106+
run: |
107+
destral --report-coverage --enable-coverage --report-junitxml ${{ github.workspace }}/report_tests -m ${{ matrix.erp-module }}
108+
109+
- name: Publish tests Results Mongo
110+
if: (success() || failure())
111+
uses: EnricoMi/publish-unit-test-result-action@v2
112+
with:
113+
junit_files: "report_tests/*.xml"
114+
check_name: "TestsResults_mongo8${{ matrix.python-version }}_${{ matrix.erp-module }}"
115+
comment_title: "Python Mongo 8 ${{ matrix.python-version }} Tests for ${{ matrix.erp-module }}"

.travis.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)