Skip to content

Commit

Permalink
Run all Odoo tests of actively used modules in the pipeline
Browse files Browse the repository at this point in the history
The script was inspired by the official Odoo runs at https://runbot.odoo.com

I have limited the tested modules to the ones that are actively used in
our JobRad installation.
  • Loading branch information
jhelfferich committed Oct 21, 2024
1 parent 51cc7a4 commit 20df5fa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ jobs:
- name: Run base Odoo tests
run: |
export ODOO_IMAGE=${{ needs.combine-docker.outputs.IMAGE_REV }}
docker compose -f tests/docker-compose.yml run --rm --remove-orphans odoo ./odoo-bin -d test --test-enable --stop
bash tests/run_tests.sh
- name: Cleanup
if: always()
Expand Down
20 changes: 20 additions & 0 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

set -e
set -u
set -o pipefail

docker compose -f tests/docker-compose.yml up -d
echo "---*** Running Odoo tests at_install ***---"
docker compose -f tests/docker-compose.yml exec odoo ./odoo-bin -d test --addons-path=addons,odoo/addons \
-i base,\
account \
--test-enable --test-tags=-post_install \
--stop-after-init
echo "---*** Running Odoo tests post_install ***---"
docker compose -f tests/docker-compose.yml exec odoo ./odoo-bin -d test --addons-path=addons,odoo/addons \
--test-enable --test-tags=/base\
/account \
--stop-after-init
docker compose -f tests/docker-compose.yml down -v

0 comments on commit 20df5fa

Please sign in to comment.