Last active
May 19, 2023 06:31
-
-
Save StefanRijnhart/dd7feb3ab293f95dee6961579997b9e4 to your computer and use it in GitHub Desktop.
Github workflow to use oca-ci with Odoo enterprise and submodules (13.0)
This file contains hidden or 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
name: test | |
on: | |
pull_request: | |
branches: | |
- "13.0*" | |
push: | |
branches: | |
- "13.0*" | |
env: | |
ADDONS_PATH: /opt/odoo/addons,enterprise,<submodule 1>,<submodule 2> | |
jobs: | |
tests: | |
runs-on: ubuntu-20.04 | |
container: ghcr.io/oca/oca-ci/py3.6-odoo13.0:latest | |
name: Test with Odoo | |
services: | |
postgres: | |
image: postgres:9.6 | |
env: | |
POSTGRES_USER: odoo | |
POSTGRES_PASSWORD: odoo | |
POSTGRES_DB: odoo | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Install ssh client for private clone | |
run: | | |
apt-get update | |
apt-get -y install openssh-client | |
- name: Checkout customizations | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
submodules: 'recursive' | |
- name: Checkout enterprise | |
uses: actions/checkout@v3 | |
with: | |
path: enterprise | |
ref: "13.0" | |
repository: <your organization>/enterprise | |
ssh-key: ${{ secrets.YOUR_SSH_KEY }} | |
persist-credentials: false | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
echo "addons_path=${ADDONS_PATH},." >> ${ODOO_RC} | |
- name: Initialize test db | |
run: oca_init_test_database | |
- name: Run tests | |
run: oca_run_tests |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment