[FIX] test workflows #15
This file contains 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: tests | |
on: | |
pull_request: | |
branches: | |
- "add_workflow" | |
push: | |
branches: | |
- "add_workflow" | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Check Modules on ${{ github.event_name }} | |
env: | |
REPO_NAME: Addons-Controllo-Accessi | |
ODOO_RC: odoo.cfg | |
ADDONS_PATH: /opt/odoo/addons,/mnt/$REPO_NAME | |
services: | |
postgres: | |
image: postgres:16.2 | |
env: | |
POSTGRES_USER: odoo | |
POSTGRES_PASSWORD: odoo | |
POSTGRES_DB: odoo | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: docker-practice/actions-setup-docker@master | |
timeout-minutes: 12 | |
- run: | | |
set -x | |
docker version | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/checkout@v4 | |
with: | |
repository: INRIM/Odoo-Qa | |
path: oqa | |
ref: '17.0' | |
token: ${{ secrets.CA_TOKEN }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade manifestoo | |
python -m pip install --upgrade coverage | |
touch $ODOO_RC | |
- name: Init Data | |
run: ${PWD}/oqa/bin/init_repo.sh | |
- name: Tests | |
run: docker run --rm -v ${PWD}/oqa/bin/run_tests.sh:/mnt/tests/runtests.sh \ | |
-v ${PWD}/:/mnt/${REPO_NAME} -v ${PWD}/${ODOO_RC}:/etc/odoo/odoo.conf --network=host odoo:17.0 \ | |
/mnt/tests/runtests.sh -d odoo -i ${ADDONS} --test-enable --test-tags=inrim --stop-after-init | |