Skip to content

Build and test actions#89

Merged
amercader merged 5 commits intomainfrom
build-test-actions
Nov 21, 2024
Merged

Build and test actions#89
amercader merged 5 commits intomainfrom
build-test-actions

Conversation

@amercader
Copy link
Copy Markdown
Member

This includes #85, which should be merged first

The build and test actions use a reusable workflow that:

  1. Sets things up
  2. Builds the base image
  3. Tests the base image. Right now it just runs ckan --help but it's a good indicator that everything works
  4. Builds the dev image
  5. Runs some logic tests that should cover most of CKAN functionality

These don't test actual endopoints of the running container as it made things more complicated but we can explore it in the future.

To be able to run the built images locally we need the service containers (solr, pg, etc) and to make these available to the running
container (inside the Github running container) we are exposing the necessary ports and (ab)using the --net=host option.

It also fixes errors in the images that were surfaced by actually having tests 😎

They use a reusable workflow that:

1. Sets things up
2. Builds the base image
3. Tests the base image. Right now it just runs `ckan --help` but it's a
   good indicator that everything works
4. Builds the dev image
5. Runs some logic tests that should cover most of CKAN functionality

These don't test actual endopoints of the running container as it
made things more complicated but we can explore it in the future.

To be able to run the built images locally we need the service
containers (solr, pg, etc) and to make these available to the running
container (inside the Github running container) we are exposing the
necessary ports and (ab)using the `--net=host` option.
And upgrade pytest-rerunfailures

To avoid error:

  File "/usr/lib/python3.9/site-packages/setuptools/_vendor/typeguard/_pytest_plugin.py", line 53, in pytest_addoption
    add_ini_option("string")
  File "/usr/lib/python3.9/site-packages/setuptools/_vendor/typeguard/_pytest_plugin.py", line 22, in add_ini_option
    parser.addini(
  File "/usr/lib/python3.9/site-packages/_pytest/config/argparsing.py", line 131, in addini
    assert type in (None, "pathlist", "args", "linelist", "bool")
AssertionError
@kowh-ai
Copy link
Copy Markdown
Contributor

kowh-ai commented Nov 19, 2024

This is all good stuff @amercader - thank you!

@amercader amercader merged commit dd3dd69 into main Nov 21, 2024
@amercader amercader deleted the build-test-actions branch November 21, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants