Commit Graph

52 Commits

Author SHA1 Message Date
Sylvain LE GAL
429a1da9b1 [REM] Test only on the first and the last supported python version. (python3.9 and python3.13.
This change allow to save time and resources on CI execution.
2024-11-05 17:30:21 +01:00
Sylvain LE GAL
ab513187f5 [ADD] compatibility with python3.13 2024-10-29 13:38:08 +01:00
Rémy Taymans
6e5e7206e5 [ADD] poetry info in CI pytest 2024-09-30 16:11:48 +02:00
Rémy Taymans
d286f868ef Change for lighter ci images
Default python images are based on debian and are heavy (~1Go).

Using alpine version for smaller images (~100Mo).

This will save space on the runner and allow more container to be run at
same time.
2024-04-12 12:50:09 +02:00
Rémy Taymans
2fa52d4602 [UPD] drop python < 3.9 support
This also fixes dependencies issues.
2024-03-22 00:51:40 +01:00
Rémy Taymans
72a5dcf434 New CI to auto build and publish
Using a commit message to trigger the build does not work when merging a
PR because last commit is the merge commit and not the commit edited
with the right name.

Given that, the jobs that will run, are defined at the creation of the
pipeline, publishing and creating a release cannot be done based on the
sate of the code.

A way to trigger publication and release is the git tags.

So with theses changes:

- linting is done only on a merge request
- testing and building are performed on a merge request and on the main
  branch

When a tag is pushed:

- check are done to ensure that the tag is the same as the version of
  the program, in order to not publish and release someting that is not
  coherent.
- the program is published on pypi.
- a release is created, but only if the tag is for a major, minor or
  patch version. No release created for an alpha, beta or pre-release
  version.

So all versions of the program are published on PyPI, but only the
important ones are published via the release mechanism. Because the
release mechanism will warn user for a new version. Version that are not
major, minor or patch are not intended to be used by end users.

The idea of auto publishing and releasing every time a commit is pushed
on the main branch does not work with semantic versioning. For doing
that maybe a calversioning will be better.

The idea of using the CI to push a tag for a new release lead to
security risk. Because the CI will contains credential for writing to
the repository, any contributor can read this token by editing the
gitlab-ci file and use token for bad purposes. Gitlab does not provide
token for writing to a repository owned by the project.

So for now, we control the publication and release of a new version with
two actions:

- updating the version on the pyproject.toml file.
- creating a tag with the same version as in the pyproject.toml file.
2024-02-21 11:50:27 +01:00
Rémy Taymans
0dc011684d Use docker-in-docker to run tests
Cortesy @maisim.

This commit allow to use docker-in-docker to run tests.

Also it will run the tests on python version defined in the
PYTHON_VERSION array. The tox.ini file is not needed anymore.
Test locally can be run on the user python version, and check against
several python version will be done by the CI.

Notice the ODOO_RPC_URL environment variable which allow to mock the RPC
request to the right url.

This tests needs to be run on custom privileged runner.
! Using gitlab runner does not work !
2023-11-09 20:50:46 +01:00
Rémy Taymans
6a36c97ee4 Use last python image for linting
The linting check can be done on any docker image with the latest python
version.

This updates de pre-commit checks and fix file linting to conform to new
standards.
2023-11-09 17:02:24 +01:00
Rémy Taymans
f143e218a0 (Also improve CI) 2023-07-13 14:24:20 +00:00
Simon
070143f3fe Wait for the container name to be truly freed before returning 2023-07-13 14:24:20 +00:00
Rémy Taymans
f130ecf078 [ADD] dumpdb: tests 2023-07-12 08:35:20 +02:00
Rémy Taymans
59025a14e0 [ADD] build and release in CI
This will produce the following behaviour:

When a commit with a title like "Bump to version x.y.z" is committed to
main branch (either by merging a merge request or by pushing it directly
to the main branch), a build of the project is triggered and the result
is pushed on PyPI.

Also a release on the github project is created with the version of the
program as title and the content of the commit message as description.

This will help deploying release of oow. It will also warn followers
that a new version is released by a notification if they choose to.

PYPI_USER and PYPI_TOKEN are value set on the gitlab settings of the
project and can only be viewed by maintainers.
2023-07-11 17:03:00 +02:00
Rémy Taymans
66fa0b45b8 Fix coverage information for badges 2022-10-10 12:06:26 +02:00
Rémy Taymans
946f051404 Fix test pipeline on main 2022-10-10 08:33:22 +00:00
Sylvain LE GAL
97d9d2b44c coincoin 2022-06-03 12:54:11 +02:00
Sylvain LE GAL
4fc20cc880 add only 2022-06-03 12:52:28 +02:00
Sylvain LE GAL
ff94dae56d je suis un toquard avec un 'C' 2022-06-03 12:37:09 +02:00
Sylvain LE GAL
3dc96ebef0 je suis un toquard 2022-06-03 12:35:59 +02:00
Sylvain LE GAL
2a0b46ca60 [WIP] add estimate-workload command 2022-06-01 01:04:10 +02:00
Sylvain LE GAL
ecd03ba392 [REF][WIP] remove xml_rpc connexion to make CI green, and replace by click_odoo script 2022-05-31 16:40:03 +02:00
Sylvain LE GAL
9e58cf4cf9 wip 2022-05-30 14:19:26 +02:00
Sylvain LE GAL
3ab09ff20d wip 2022-05-30 14:02:57 +02:00
Sylvain LE GAL
0aa9f8bf36 try 2022-05-30 13:51:00 +02:00
Sylvain LE GAL
47649f03e7 try 2022-05-30 13:48:33 +02:00
Sylvain LE GAL
bd68cd94b6 [TRY] pin python version 2022-05-30 13:39:44 +02:00
Sylvain LE GAL
534a1ecbbe [TRY] pin python version 2022-05-30 13:39:13 +02:00
Sylvain LE GAL
d4a2949dca [TRY] Fix 2022-05-30 13:11:50 +02:00
Sylvain LE GAL
228835f2ab [TRY] Fix CI 2022-05-30 13:04:07 +02:00
Sylvain LE GAL
7420ba519e wip 2022-05-19 17:57:33 +02:00
Sylvain LE GAL
fca87d1483 [WIP] refactor simplify tests 2022-05-19 17:33:48 +02:00
Sylvain LE GAL
35dc4fd767 wip 2022-05-19 17:03:28 +02:00
Sylvain LE GAL
82430e2d36 [TRY] FIX CI 2022-05-09 16:46:59 +02:00
Sylvain LE GAL
a0eb99fd48 coucou 2022-05-06 14:32:49 +02:00
Sylvain LE GAL
fb28a547f2 et bien non ! 2022-05-05 21:04:19 +02:00
Sylvain LE GAL
4b8872e326 ON TRY ??? 2022-05-05 20:31:33 +02:00
Sylvain LE GAL
1028d74db2 [FIX] make all the containers working great together ! 2022-05-05 18:59:21 +02:00
Sylvain LE GAL
3600c7e89c wip 2022-05-05 13:49:48 +02:00
Sylvain LE GAL
6af6d30d77 [Save the planet] 2022-05-05 13:36:42 +02:00
Sylvain LE GAL
e2a6c96406 [CI] add scripts manually 2022-05-05 13:35:26 +02:00
Sylvain LE GAL
74cfe7c989 wip 2022-05-05 13:19:31 +02:00
Sylvain LE GAL
ffa406ef20 WIp 2022-05-05 13:08:46 +02:00
Sylvain LE GAL
778a2c88b4 fixup! wip 2022-05-05 01:16:34 +02:00
Sylvain LE GAL
5ee20f8291 wip 2022-05-05 01:04:47 +02:00
Sylvain LE GAL
38c01e014b wip 2022-05-05 00:48:44 +02:00
Sylvain LE GAL
6b1ffa2a8c [IMP] make modular port on host. default with 9069 and 9432 to avoid conflict on host that regularly expose 8069 and 5432 2022-05-03 21:46:44 +02:00
Sylvain LE GAL
5a75cb81d2 [FIX] CI, mais en fait pas du tout ! 2022-04-11 13:58:02 +02:00
Sylvain LE GAL
b1b64c960f [FIX] CI ; [WIP] add get_odoo_addons_path 2022-04-11 13:50:28 +02:00
Sylvain LE GAL
5776ff5893 [IMP] add --database option ; [CI] try to fix ci, adding a postgresql container 2022-04-11 13:22:29 +02:00
Sylvain LE GAL
fbd58837e3 [FIX] restore black check 2022-04-10 21:51:46 +02:00
Sylvain LE GAL
9c376bbb34 [FIX] CI 2022-04-10 20:50:58 +02:00