Skip to content

[FIX] Avoid overpassing line length in tasks_downstream #975

[FIX] Avoid overpassing line length in tasks_downstream

[FIX] Avoid overpassing line length in tasks_downstream #975

Workflow file for this run

name: test
on:
pull_request:
push:
branches:
- devel
- stable
workflow_dispatch:
inputs:
pytest_addopts:
description:
Extra options for pytest; use -vv for full details; see
https://docs.pytest.org/en/latest/example/simple.html#how-to-change-command-line-options-defaults
required: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LANG: "en_US.utf-8"
LC_ALL: "en_US.utf-8"
PIP_CACHE_DIR: ${{ github.workspace }}/.cache.~/pip
PIPX_HOME: ${{ github.workspace }}/.cache.~/pipx
POETRY_CACHE_DIR: ${{ github.workspace }}/.cache.~/pypoetry
POETRY_VIRTUALENVS_IN_PROJECT: "true"
PRE_COMMIT_HOME: ${{ github.workspace }}/.cache.~/pre-commit
PYTEST_ADDOPTS: ${{ github.event.inputs.pytest_addopts }}
PYTHONIOENCODING: "UTF-8"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.8
- 3.9
- "3.10"
- 3.11
odoo-version:
- 7.0
- 8.0
- 9.0
- 10.0
- 11.0
- 12.0
- 13.0
- 14.0
- 15.0
- 16.0
steps:
# Shared steps
- uses: actions/checkout@v3
with:
fetch-depth: 0Fetch all history for all tags and branches
- name: Install python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Compose
uses: ndeloof/install-compose-action@c036dce35dc2a23597c03aa05f32347b2cfa0437
with:
version: v2.20.3
legacy: false # force V2
- name: Generate cache key CACHE
run:
echo "CACHE=${{ secrets.CACHE_DATE }} ${{ runner.os }} $(python -VV |
sha256sum | cut -d' ' -f1) ${{ hashFiles('pyproject.toml') }} ${{
hashFiles('poetry.lock') }} ${{ hashFiles('.pre-commit-config.yaml') }}" >>
$GITHUB_ENV
- uses: actions/cache@v3
with:
path: |
.cache.~
.venv
~/.local/bin
key: venv ${{ env.CACHE }}
- run: pip install poetry
- name: Patch $PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- run: poetry install
# Precreate shared networks to avoid race conditions
- run: docker network create inverseproxy_shared
- run: docker network create globalwhitelist_shared
# Let tests issue git commits
- run: git config --global user.name CI
- run: git config --global user.email CI@GITHUB
# Run all tests, which includes linters
# Non concurrent first (in parallel)
- run: poetry run invoke test
env:
SELECTED_ODOO_VERSIONS: ${{ matrix.odoo-version }}
# Concurrent tests (isolated)
- run: poetry run invoke test --sequential
env:
SELECTED_ODOO_VERSIONS: ${{ matrix.odoo-version }}