Skip to content

ci: add e2e workflow + fix preset compatibility for 12.0 and 18.0+ #5

ci: add e2e workflow + fix preset compatibility for 12.0 and 18.0+

ci: add e2e workflow + fix preset compatibility for 12.0 and 18.0+ #5

Workflow file for this run

name: e2e
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- main
schedule:
- cron: "0 4 * * *"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Odoo ${{ matrix.odoo_version }} (Python ${{ matrix.python_version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- odoo_version: "18.0"
python_version: "3.10"
- odoo_version: "19.0"
python_version: "3.10"
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Bootstrap
run: |
mkdir -p ~/code
cat > ~/code/config.toml << 'EOF'
versions = ["${{ matrix.odoo_version }}"]
[tools]
uv = ["odoo-addons-path"]
[repos]
odoo = ["odoo"]
EOF
# workaround to be able to clone repos without ssh in CI:
git config --global url."https://github.com/".insteadOf "git@github.com:"
curl -fsSL https://raw.githubusercontent.com/trobz/local.py/main/bootstrap.sh | bash
tlc --no-newcomer install-tools
tlc --no-newcomer init
tlc --no-newcomer pull-repos
- name: Check out odoo-venv
uses: actions/checkout@v4
- name: Install odoo-venv
run: uv tool install .
- name: Create Odoo virtual environment
run: |
odoo-venv create ${{ matrix.odoo_version }} \
--odoo-dir ~/code/odoo/${{ matrix.odoo_version }} \
--venv-dir ~/code/venvs/${{ matrix.odoo_version }} \
--python-version ${{ matrix.python_version }}