aiidateam / aiida-core

The official repository for the AiiDA code
https://aiida-core.readthedocs.io
Other
411 stars 184 forks source link

Devops: Add tox environment that runs tests with sqlite backend #6450

Open agoscinski opened 3 weeks ago

agoscinski commented 3 weeks ago

The problem with the current tox test environments is that they do require psql database which require a service running in the background. With the merge of #6425, we can use the sqlite backend to run tests more encapsulated with less dependencies on global configurations.

I still need to figure out how to set up a ssh config in a virtual-environment-friendly way. We could just run the .github/workflow/setup_ssh.sh file, but then it messes too much with existing ssh configuration. One could add an include in ${HOME}/.ssh/config to include another config file that is stored locally in the tox environment.

Include ${AIIDA_DEV_TOX_ENVIRONMENT}/custom_ssh_config

This just adds one line to the user config, that only works inside the tox environment. So does not have any effect outside of the environment to the functionality of ssh.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 77.86%. Comparing base (ef60b66) to head (90312f8). Report is 30 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6450 +/- ## ========================================== + Coverage 77.51% 77.86% +0.36% ========================================== Files 560 562 +2 Lines 41444 41794 +350 ========================================== + Hits 32120 32539 +419 + Misses 9324 9255 -69 ``` | [Flag](https://app.codecov.io/gh/aiidateam/aiida-core/pull/6450/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidateam) | Coverage Δ | | |---|---|---| | [presto](https://app.codecov.io/gh/aiidateam/aiida-core/pull/6450/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidateam) | `73.19% <ø> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidateam#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

danielhollas commented 3 weeks ago

@agoscinski FYI One another improvement that I wanted to do but did not get to is to make graphviz dependency optional i.e. to automatically skip tests that need it if it is not available. We already do this for other external optional dependencies (e.x. xcrysden et al).