From f0b37548ce827003bbcdc65fa8be33d03fb2aa3f Mon Sep 17 00:00:00 2001 From: newtratip Date: Thu, 31 Aug 2023 17:58:32 +0700 Subject: [PATCH] [ADD] test_build_odoo.yml --- .github/workflows/test_build_odoo.yml | 27 ++++++++++++++++++++++++++- .github/workflows/test_pre_commit.yml | 15 +++++++++++++++ odoo/custom/src/addons.yaml | 5 +++++ odoo/custom/src/repos.yaml | 14 +++++++++++--- 4 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/test_pre_commit.yml diff --git a/.github/workflows/test_build_odoo.yml b/.github/workflows/test_build_odoo.yml index 8074ce1..32f0835 100644 --- a/.github/workflows/test_build_odoo.yml +++ b/.github/workflows/test_build_odoo.yml @@ -7,6 +7,31 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 + - name: Install docker + run: | + sudo apt-get update + sudo apt-get install ca-certificates curl gnupg + sudo install -m 0755 -d /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg + sudo chmod a+r /etc/apt/keyrings/docker.gpg + echo \ + "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ + "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + sudo apt-get update + sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose + - name: Install the dependencies + run: | + python3 -m pip install --user pipx + pipx install copier + pipx install invoke + pipx install pre-commit + pipx ensurepath + - name: Build odoo + run: invoke develop img-build git-aggregate resetdb start + - name: Install addons + run: | + invoke install --extra --private diff --git a/.github/workflows/test_pre_commit.yml b/.github/workflows/test_pre_commit.yml new file mode 100644 index 0000000..713d2f4 --- /dev/null +++ b/.github/workflows/test_pre_commit.yml @@ -0,0 +1,15 @@ +name: Test Pre Commit + +on: + pull_request: + branches: + - 15.0 + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - run: | + pip install pre-commit + pre-commit run -a diff --git a/odoo/custom/src/addons.yaml b/odoo/custom/src/addons.yaml index e69de29..72113f8 100644 --- a/odoo/custom/src/addons.yaml +++ b/odoo/custom/src/addons.yaml @@ -0,0 +1,5 @@ +partner-contact: + - partner_bank_code + - partner_company_type + - partner_fax + - partner_firstname diff --git a/odoo/custom/src/repos.yaml b/odoo/custom/src/repos.yaml index 0a78f50..0c40efe 100644 --- a/odoo/custom/src/repos.yaml +++ b/odoo/custom/src/repos.yaml @@ -4,7 +4,7 @@ # Shallow repositories ($DEPTH_DEFAULT=1) are faster & thinner # You may need a bigger depth when merging PRs (use $DEPTH_MERGE # for a sane value of 100 commits) - depth: $DEPTH_DEFAULT + depth: $DEPTH_MERGE remotes: ocb: https://github.com/OCA/OCB.git odoo: https://github.com/odoo/odoo.git @@ -12,5 +12,13 @@ target: ocb $ODOO_VERSION merges: - ocb $ODOO_VERSION - # Example of a merge of the PR with the number - # - oca refs/pull//head + - odoo refs/pull/126619/head # [15.0][FIX] hr_expense: show paid_by and message refuse duplicate + +partner-contact: + defaults: + depth: $DEPTH_DEFAULT + remotes: + origin: https://github.com/OCA/partner-contact.git + target: origin $ODOO_VERSION + merges: + - origin $ODOO_VERSION