Skip to content

refactor(workflows): use reusable workflows with a single branch #22

refactor(workflows): use reusable workflows with a single branch

refactor(workflows): use reusable workflows with a single branch #22

Workflow file for this run

name: Test and Publish
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "**/workflows/**"
- "**/resources/**"
- Dockerfile
pull_request:
paths:
- "**/workflows/**"
- "**/resources/**"
- Dockerfile
permissions:
contents: read
packages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
odoo_version: ["15.0", "16.0", "17.0", "18.0", master]
include:
# Odoo-version-specific configurations
- odoo_version: "15.0"
python_version: "3.12"
python_variant: slim-bullseye
wkhtmltox_version: 0.12.6.1-3
- odoo_version: "16.0"
python_version: "3.12"
python_variant: slim-bookworm
wkhtmltox_version: 0.12.6.1-3
- odoo_version: "17.0"
python_version: "3.12"
python_variant: slim-bookworm
wkhtmltox_version: 0.12.6.1-3
- odoo_version: "18.0"
python_version: "3.12"
python_variant: slim-bookworm
wkhtmltox_version: 0.12.6.1-3
- odoo_version: master
python_version: "3.12"
python_variant: slim-bookworm
wkhtmltox_version: 0.12.6.1-3
uses: ./.github/workflows/build-docker-image.yaml
with:
odoo_version: ${{ matrix.odoo_version }}
python_version: ${{ matrix.python_version }}
python_variant: ${{ matrix.python_variant }}
wkhtmltox_version: ${{ matrix.wkhtmltox_version }}
dockerfile_path: Dockerfile
dockerfile_target: production
secrets: inherit
test:
needs: [build]
strategy:
matrix:
odoo_version: ["15.0", "16.0", "17.0", "18.0", master]
uses: ./.github/workflows/unit-tests.yaml
with:
odoo_version: ${{ matrix.odoo_version }}
secrets: inherit
publish:
needs:
- build
- test
strategy:
matrix:
odoo_version: ["15.0", "16.0", "17.0", "18.0", master]
include:
# Odoo-version-specific configurations
- odoo_version: "15.0"
python_version: "3.10"
python_variant: slim-bullseye
wkhtmltox_version: 0.12.6
- odoo_version: "16.0"
python_version: "3.12"
python_variant: slim-bullseye
wkhtmltox_version: 0.12.6
- odoo_version: "17.0"
python_version: "3.13"
python_variant: slim-bullseye
wkhtmltox_version: 0.12.6
- odoo_version: "18.0"
python_version: "3.13"
python_variant: slim-bullseye
wkhtmltox_version: 0.12.6
- odoo_version: master
python_version: "3.13"
python_variant: slim-bullseye
wkhtmltox_version: 0.12.6
uses: ./.github/workflows/build-docker-image.yaml
if: ${{ github.event_name != 'pull_request' }}
with:
odoo_version: ${{ matrix.odoo_version }}
python_version: ${{ matrix.python_version }}
python_variant: ${{ matrix.python_variant }}
wkhtmltox_version: ${{ matrix.wkhtmltox_version }}
dockerfile_path: Dockerfile
dockerfile_target: production
secrets: inherit