Skip to content

Merge pull request #109 from INRIM/t_12683 #126

Merge pull request #109 from INRIM/t_12683

Merge pull request #109 from INRIM/t_12683 #126

Workflow file for this run

name: tests
env:
REPO_NAME: Addons-Controllo-Accessi
ODOO_RC: odoo.cfg
ADDONS_PATH: /opt/odoo/addons,/mnt/server-auth,/mtn/partner-contact,/mnt/server-env,/mnt/Addons-Controllo-Accessi
TESTTAGS: inrim
OE_VER: "17.0"
on:
pull_request:
branches:
- "17.0*"
push:
branches:
- "17.0"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
name: Check Modules on ${{ github.event_name }}
services:
postgres:
image: postgres:16.2
env:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
POSTGRES_DB: odoo
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.REPO_NAME }}
persist-credentials: false
fetch-depth: 1
- uses: actions/checkout@v4
with:
repository: INRIM/Odoo-Qa
path: oqa
ref: ${{ env.OE_VER }}
token: ${{ secrets.CA_TOKEN }}
fetch-depth: 1
- uses: actions/checkout@v4
with:
repository: OCA/server-auth
path: server-auth
ref: ${{ env.OE_VER }}
fetch-depth: 1
- uses: actions/checkout@v4
with:
repository: OCA/partner-contact
path: partner-contact
ref: ${{ env.OE_VER }}
- uses: actions/checkout@v4
with:
repository: OCA/server-env
path: server-env
ref: ${{ env.OE_VER }}
fetch-depth: 1
- run: pip install -r server-auth/requirements.txt
- run: pip install -r server-auth/test-requirements.txt
- name: Install dependencies
run: ${PWD}/oqa/bin/install_deps.sh
- name: Create dir
run: |
mkdir ${PWD}/reader-data
mkdir ${PWD}/reader-data/TODO
mkdir ${PWD}/reader-data/DONE
mkdir ${PWD}/reader-data/ERR
- name: Init Data
run: ${PWD}/oqa/bin/init_repo.sh
- name: Tests
run: docker run --rm --user root -v ${PWD}/reader-data:/mnt/reader-data:rw -v ${PWD}/run_tests.sh:/mnt/tests/runtests.sh -v ${PWD}/partner-contact:/mtn/partner-contact -v ${PWD}/server-auth:/mnt/server-auth -v ${PWD}/server-env:/mnt/server-env -v ${PWD}/${{ env.REPO_NAME }}:/mnt/${{ env.REPO_NAME }} -v ${PWD}/${ODOO_RC}:/etc/odoo/odoo.conf --network=host odoo:${{ env.OE_VER }} /mnt/tests/runtests.sh