Project

General

Profile

Actions

Feature #1582

closed

GitHub test actions

Added by Alexander Watzinger about 3 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Backend
Target version:
Start date:
2021-09-21
Estimated time:

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

Related issues 1 (0 open1 closed)

Related to OpenAtlas - Feature #1542: OpenAtlas on KubernetesClosedBernhard Koschiček-Krombholz2021-06-30Actions
Actions #1

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.

Actions #2

Updated by Alexander Watzinger about 3 years ago

  • Description updated (diff)
Actions #3

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

Actions #4

Updated by Alexander Watzinger about 3 years ago

  • Description updated (diff)
Actions #5

Updated by Alexander Watzinger about 3 years ago

  • Target version changed from 6.6.0 to 7.0.0
Actions #6

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
Actions #7

Updated by Alexander Watzinger almost 3 years ago

  • Description updated (diff)
  • Target version changed from Wishlist to 7.1.0
Actions #8

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.

Actions #9

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.

Actions #10

Updated by Alexander Watzinger almost 3 years ago

  • Target version changed from 7.1.0 to 7.3.0
Actions #11

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'

Actions #12

Updated by Alexander Watzinger almost 3 years ago

  • Status changed from In Progress to Acknowledged
  • Assignee deleted (Alexander Watzinger)
Actions #13

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.

Actions #14

Updated by Alexander Watzinger over 2 years ago

  • Estimated time deleted (8.00 h)
Actions #15

Updated by Alexander Watzinger almost 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
Actions #16

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

Actions #17

Updated by Bernhard Koschiček-Krombholz almost 2 years ago

Actions #18

Updated by Alexander Watzinger almost 2 years ago

  • Status changed from Assigned to In Progress
Thank you for your work, can you please also look into adding the nice icons on top:
Actions #19

Updated by Bernhard Koschiček-Krombholz almost 2 years ago

  • Description updated (diff)
  • Status changed from In Progress to Closed

Implemented in develop.

Actions #20

Updated by Alexander Watzinger almost 2 years ago

  • Target version changed from 7.12.0 to 7.11.0
Actions #21

Updated by Alexander Watzinger almost 2 years ago

Not sure if this has anything to do with the current GitHub test failing issues but I noticed that the "exiftran" package new in install.md wasn't in the Docker file.
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.

Actions #22

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.

Actions

Also available in: Atom PDF