Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- "19.0"
- "19.0-ocabot-*"
# Nightly full run: the ONLY run that measures coverage and uploads it to Codecov, once.
schedule:
- cron: "45 23 * * *"

jobs:
unreleased-deps:
Expand Down Expand Up @@ -63,9 +66,33 @@ jobs:
run: manifestoo -d . check-dev-status --default-dev-status=Beta
- name: Initialize test db
run: oca_init_test_database
# Coverage only on the nightly run. Other runs execute the same command as
# `oca_run_tests` (OCA/oca-ci, bin/oca_run_tests) without `coverage run --branch`:
# the tracer slows Python down and the report would be thrown away anyway.
# bash, not the container's default sh (dash): dash rejects `set -o pipefail`.
- name: Run tests
run: oca_run_tests
- uses: codecov/codecov-action@v4
shell: bash
env:
COVERAGE: ${{ github.event_name == 'schedule' && matrix.name == 'test with Odoo' }}
run: |
if [ "$COVERAGE" = "true" ]; then
oca_run_tests
exit 0
fi
set -o pipefail
oca_wait_for_postgres
ADDONS=$(oca_list_addons_to_test)
if [ -z "$ADDONS" ]; then
exit 0
fi
unbuffer $(which odoo) \
-d ${PGDATABASE} \
-i ${ADDONS} \
--test-enable \
--http-interface=127.0.0.1 \
--stop-after-init | oca_checklog_odoo
- if: ${{ github.event_name == 'schedule' && matrix.name == 'test with Odoo' }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Update .pot files
Expand Down
Loading