[ADD] Odoo tests workflow for 16.0 and 18.0
This commit is contained in:
44
config/16.0/.gitea/workflows/test.yml
Normal file
44
config/16.0/.gitea/workflows/test.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
name: tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "16.0*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: odoo-ci
|
||||
container:
|
||||
image: docker.0k.io/mirror/odoo:rc_16.0-ELABORE-LIGHT
|
||||
services:
|
||||
postgres:
|
||||
image: docker.0k.io/postgres:17.2.0-myc
|
||||
env:
|
||||
POSTGRES_USER: odoo
|
||||
POSTGRES_PASSWORD: odoopassword
|
||||
POSTGRES_DB: postgres
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Detect changed modules
|
||||
id: changed
|
||||
run: |
|
||||
base="${{ gitea.base_ref }}"
|
||||
base="${base:-${{ gitea.event.pull_request.base.ref }}}"
|
||||
git fetch origin "$base"
|
||||
modules="$(
|
||||
git diff --name-only "origin/$base...HEAD" |
|
||||
awk -F/ '{print $1}' | sort -u |
|
||||
while read -r dir; do
|
||||
[ -f "$dir/__manifest__.py" ] && echo "$dir"
|
||||
done | paste -sd, -
|
||||
)"
|
||||
echo "modules=$modules" >> "$GITHUB_OUTPUT"
|
||||
echo "Changed installable modules: ${modules:-<none>}"
|
||||
|
||||
- name: Run Odoo tests
|
||||
if: steps.changed.outputs.modules != ''
|
||||
run: bash .gitea/scripts/odoo-tests.sh "${{ steps.changed.outputs.modules }}"
|
||||
Reference in New Issue
Block a user