Skip to content

fix: tests

fix: tests #4

Workflow file for this run

name: Test
on:
pull_request:
branches: [master]
push:
branches: [master]
workflow_call:
jobs:
pre-commit:
runs-on: ubuntu-latest
env:
DEBIAN_FRONTEND: noninteractive
POETRY_NO_INTERACTION: 1
POETRY_NO_DEV: 1
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.13"
- name: Install poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: latest
- uses: actions/cache@v4
with:
path: |
~/.cache/pre-commit
.venv
.cache
key: ${{ runner.os }}-{{ hashFiles('**/poetry.lock') }}-{{ hashFiles('**/.pre-commit-config.yaml') }}
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- uses: pre-commit/action@v3.0.1
isodoo:
strategy:
matrix:
odoo_version:
- "6.0"
- "6.1"
- "7.0"
- "8.0"
- "9.0"
- "10.0"
- "11.0"
- "12.0"
- "13.0"
- "14.0"
- "15.0"
- "16.0"
- "17.0"
- "18.0"
- "19.0"
python-version: [3.13]
fail-fast: false
runs-on: ubuntu-latest
needs: pre-commit
env:
DEBIAN_FRONTEND: noninteractive
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
steps:
- uses: actions/cache@v4
with:
path: |
.venv
.cache
key: ${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Switch to current branch
run: git checkout ${{ env.BRANCH }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
check-latest: true
- name: Install poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: latest
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Run pytest
run: poetry run pytest --odoo-version ${{ matrix.odoo_version }} --no-cache -v