Nightwatch tests not found in issue fork's pipeline

Created on 11 December 2023, 7 months ago
Updated 15 December 2023, 7 months ago

Problem/Motivation

I noticed that for a contrib project pipelines (after pushing a new commit to an MR) sometimes run in the issue fork repo and sometimes in the main repo (I don't know why).
And when this happens in the issue fork repo, nightwatch can't find tests because of incorrect tag. E.g.,
node -r dotenv-safe/config ./node_modules/.bin/nightwatch --config ./tests/Drupal/Nightwatch/nightwatch.conf.js --tag=styleswitcher-3403145

Steps to reproduce

The reference project issue and an MR:

Example nightwatch job log in the fork repo: https://git.drupalcode.org/issue/styleswitcher-3403145/-/jobs/467211
Example nightwatch job log in the main repo for reference: https://git.drupalcode.org/project/styleswitcher/-/jobs/467443

Proposed resolution

As suggested by @fjgarlin in slack, replace $CI_PROJECT_NAME for ${CI_PROJECT_NAME%-*} in that line. That strips out anything after the hypen (-), as forks are named module_name-12345.

πŸ› Bug report
Status

Fixed

Component

gitlab-ci

Created by

πŸ‡ΊπŸ‡¦Ukraine pingwin4eg Zaporizhia πŸ‡ΊπŸ‡¦

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024