Skip to main content

Utility for use in gitlab ci to check merge requests have been marked tested

Project description

We use informal testing alongside automated CI testing which is documented in our merge requests.

Once a project member has done some testing, the basic test steps are documented in a comment on the merge request with the tested label attached to that comment by addding the text “~tested” to the comment.

This python script is run as the last step of ci and uses the gitlab api to inspect Merge Requests covering the current commit to see if they have a “tested” comment. If not, the “untested” label is added to the MR. If the tested comment does exist, the “untested” label is removed and the “tested” one added.

If the tested comment is not present, the CI job is failed.

It can be used in a gitlab-ci.yml stage like:

stages:
  - test
  - build
  - release
  - tested

< ... snip ... >

mr_tested:
  only:
    - branches
  stage: tested
  image: python:3
  script:
    - pip install gitlab_ci_mr_tested
    - gitlab_ci_mr_tested --token "${PRIVATE_TOKEN}" --label "tested" --add-untested "untested"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

gitlab_ci_mr_tested-1.6-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file gitlab_ci_mr_tested-1.6-py3-none-any.whl.

File metadata

  • Download URL: gitlab_ci_mr_tested-1.6-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for gitlab_ci_mr_tested-1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 909a08f24bd3c8eaf25a32cbc624adf3fa6604497d97d07b7b3b9e86d476491b
MD5 e5bd18dc0d00b8f0fb1d1e50a5b0f193
BLAKE2b-256 8a9750f7a895bdd9233a903e2664815a457f34d79c570be9b885ae5010bd3488

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page