ci: addon qualification gate (Pillar 1)
Some checks failed
addon-qualify / qualify (push) Failing after 46s
Some checks failed
addon-qualify / qualify (push) Failing after 46s
This commit is contained in:
46
.gitea/workflows/addon-qualify.yml
Normal file
46
.gitea/workflows/addon-qualify.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
# Pillar 1 of the addon-qualification proposal — runs on every push to any
|
||||
# branch and on every PR. Pulls the latest qualify-addon.py from the v3
|
||||
# monorepo and runs it against every addon directory in this repo.
|
||||
#
|
||||
# admit-with-warning posture: the workflow does NOT fail the build when an
|
||||
# addon fails the lint. The result is published as a check annotation so
|
||||
# operators can see it on the catalog card. (See docs/PROPOSAL_ADDON_QUALIFICATION.md
|
||||
# in odoo-tower/odooskyv3 for the rationale.)
|
||||
name: addon-qualify
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
qualify:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout addons repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Fetch qualify-addon.py from v3 monorepo
|
||||
run: |
|
||||
curl -fsSL 'https://git.odoosky.org/odoo-tower/odooskyv3/raw/branch/main/scripts/qualify-addon.py' -o /tmp/qualify-addon.py
|
||||
chmod +x /tmp/qualify-addon.py
|
||||
head -1 /tmp/qualify-addon.py
|
||||
|
||||
- name: Run qualifier on every addon
|
||||
run: |
|
||||
set +e
|
||||
ADDONS=()
|
||||
for d in addons/*/; do
|
||||
[ -f "$d/__manifest__.py" ] && ADDONS+=("${d%/}")
|
||||
done
|
||||
if [ ${#ADDONS[@]} -eq 0 ]; then
|
||||
echo "No addons under addons/ — nothing to qualify"
|
||||
exit 0
|
||||
fi
|
||||
echo "Qualifying ${#ADDONS[@]} addons..."
|
||||
python3 /tmp/qualify-addon.py "${ADDONS[@]}"
|
||||
QUAL_RC=$?
|
||||
echo
|
||||
echo "::notice ::qualifier exit code $QUAL_RC (admit-with-warning — not failing build)"
|
||||
# Always succeed; the report is the artifact.
|
||||
exit 0
|
||||
Reference in New Issue
Block a user