Feature #1582
closedGitHub test actions
Added by Alexander Watzinger about 3 years ago. Updated almost 2 years ago.
Description
I'm looking into GitHub actions to automatically test the application when pushing.
- Add icons for passed test
- Try to remove adaptions for GitHub actions from productive code
- Adapt for OpenAtlas
Updated by Alexander Watzinger about 3 years ago
So far I got it running somehow but got stuck because of an import module flask error. I'm not sure but it may be related to have to use Ubuntu (instead Debian) on the GitHub test systems.
Updated by Alexander Watzinger about 3 years ago
Example of another project with coverage by Peter: https://github.com/acdh-oeaw/mmp/blob/master/.github/workflows/test.yml
Updated by Alexander Watzinger about 3 years ago
- Target version changed from 6.6.0 to 7.0.0
Updated by Alexander Watzinger almost 3 years ago
- Description updated (diff)
- Status changed from In Progress to Acknowledged
- Assignee deleted (
Alexander Watzinger) - Target version changed from 7.0.0 to Wishlist
Updated by Alexander Watzinger almost 3 years ago
- Description updated (diff)
- Target version changed from Wishlist to 7.1.0
Updated by Alexander Watzinger almost 3 years ago
- Status changed from Acknowledged to In Progress
- Assignee set to Alexander Watzinger
- Estimated time set to 8.00 h
Got tests running and badge showing on OpenAtlas website (https://github.com/craws/OpenAtlas-Website) in feature_testing branch.
I will try to remove code adaptions for GitHub actions in production code before merging to main and than begin implementation for the OpenAtlas application.
I got coverage working but removed it again because showing a badge for coverage seem to include 3rd party services and hackish workarounds, maybe in another version.
Updated by Alexander Watzinger almost 3 years ago
GitHub actions for tests are implemented at the OpenAtlas website, see https://github.com/craws/OpenAtlas-Website with the test icon at the top of README.md.
I managed to keep adaptions for GitHub out of the OpenAtlas website code and contain it in .github (except the linked icon in README.md).
Next step will be implementation in the main OpenAtlas application, which will require more advanced setup to e.g. include database operations.
Updated by Alexander Watzinger almost 3 years ago
- Target version changed from 7.1.0 to 7.3.0
Updated by Alexander Watzinger almost 3 years ago
Looks like adaptions for OpenAtlas to be tested via GitHub actions will require a lot of work and many try/error attempts.
I came as far (in branch feature_github_tests) till running into PostgreSQL issues. At the GitHub Ubuntu test server instance only PostgreSQL version 12 (instead 13) seems to be available which shouldn't be that much of a problem.
Next things was that psycopg2 doesn't seem to find it's own modules:
File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 50, in <module> from psycopg2._psycopg import ( # noqa ModuleNotFoundError: No module named 'psycopg2._psycopg'
Updated by Alexander Watzinger almost 3 years ago
- Status changed from In Progress to Acknowledged
- Assignee deleted (
Alexander Watzinger)
Updated by Alexander Watzinger almost 3 years ago
- Target version changed from 7.3.0 to Wishlist
Put back on wishlist as discussed in today's meeting. Maybe when looking into Kubernetes implementation it would be a good opportunity to continue because issues sound similar.
Updated by Alexander Watzinger over 2 years ago
- Estimated time deleted (
8.00 h)
Updated by Alexander Watzinger about 2 years ago
- Status changed from Acknowledged to Assigned
- Assignee set to Bernhard Koschiček-Krombholz
- Target version changed from Wishlist to 7.12.0
Updated by Bernhard Koschiček-Krombholz almost 2 years ago
Together with Omar, we managed to get tests running as GitHub Actions. Some tests fail, but the container as it is works now fine.
Next step is to update to the new main/develop version and try to resolve the test errors. (maybe with Alex if he has time)
For information of the action see https://github.com/acdh-oeaw/OpenAtlas/actions/runs/3987634049/jobs/6837771659
Updated by Bernhard Koschiček-Krombholz almost 2 years ago
- Related to Feature #1542: OpenAtlas on Kubernetes added
Updated by Alexander Watzinger almost 2 years ago
- Status changed from Assigned to In Progress
- Tests passing (or not), you can look at README of e.g. https://github.com/craws/OpenAtlas-Website
- Coverage - not sure how to do this but I'm sure you find information about it when searching, you can also take a look at e.g. ACDH-CH repo: https://github.com/acdh-oeaw/abcd-db
Updated by Bernhard Koschiček-Krombholz almost 2 years ago
- Description updated (diff)
- Status changed from In Progress to Closed
Implemented in develop.
Updated by Alexander Watzinger almost 2 years ago
- Target version changed from 7.12.0 to 7.11.0
Updated by Alexander Watzinger almost 2 years ago
No surprise there because I added it to the install myself but we have to keep remembering when adding packages now:
- Add to INSTALL.md
- Add to Docker file
- Add it to requirement.txt (it's still missing there by the way, but I'm on vacation and not in the mood to track down the equivalent needed there)
- Document it in upgrade notes
Maybe there is a way to make this less error prone? However, exiftran is now added to the Docker file as well.
Updated by Bernhard Koschiček-Krombholz almost 2 years ago
I don't think, that this was causing any problems for the GitHub tests.
You are right, that we have to keep that in mind. I thought that "exiftran" is a Debian lib, which is automatically installed with Debian, my fault.
I added it to the release notes.
This lib is an exclusively Linux library and has nothing to do with Python, therefore there is no pip package.