Skip to content

update workflow

update workflow #4

Workflow file for this run

name: Odoo Tests
on:
push:
branches: ["17.0*"]
pull_request:
branches: ["17.0*"]
jobs:
test:
runs-on: ubuntu-latest
services:
db:
image: postgres:15
env:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
POSTGRES_DB: odoo
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U odoo -d odoo"
--health-interval 10s
--health-timeout 5s
--health-retries 5
odoo:
image: odoo:17.0
env:
HOST: db
USER: odoo
PASSWORD: odoo
PGHOST: db
PGPORT: 5432
PGUSER: odoo
PGPASSWORD: odoo
PGDATABASE: odoo
options: >-
--health-cmd "curl -f http://localhost:8069 || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Wait for Odoo to be ready
run: |
until curl -f http://localhost:8069; do
echo "Waiting for Odoo..."
sleep 5
done
- name: Run Odoo tests
run: |
docker exec $(docker ps -q -f ancestor=odoo:17.0) \
odoo/odoo-bin --addons-path=addons,odoo/addons --db_host=db --db_user=odoo --db_password=odoo \
-d odoo --init=restful --test-tags /restful --stop-after-init