Skip to content
Snippets Groups Projects

Refactor Jest CI scripts

Merged Mark Florian requested to merge extract-jest-ci-script into master

What does this MR do and why?

Encapsulate CI Jest commands in a script

This script is intended to replace the eight jest:ci* scripts in package.json. The eight variations arise from three booleans:

  • Vue version (2 or 3),
  • predictive/full test runs, and
  • tests which do/don't need fixtures.

The motivation for creating this single script is to make it clearer how to run Jest specs under Vue 3.

Many people have tried and failed to replicate CI failurs locally by running yarn jest:ci* scripts locally. The reason is that those scripts have implicit dependencies that aren't satisfied (e.g., the VUE_VERSION environment variable).

This new script helps by pointing users to resources to help them with Vue 3 testing, both after CI failures, and when attempting to run it locally.

Finally, this deletes the jest:ci* scripts, and updates references in CI to call the new script directly.

It also removes a couple of other unused jest:ci* scripts.

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

  • n/a

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Example jobs

Vue 3 Predictive Fixtures Job FIXME
:x: :x: :x: passing, failing
:x: :x: :white_check_mark: passing, failing
:x: :white_check_mark: :x: passing, failing
:x: :white_check_mark: :white_check_mark: passing, failing
:white_check_mark: :x: :x: passing, failing
:white_check_mark: :x: :white_check_mark: passing, failing
:white_check_mark: :white_check_mark: :x: passing, failing
:white_check_mark: :white_check_mark: :white_check_mark: failing (there isn't a passing example here because I forgot that this job isn't sharded, and so didn't create another pipeline for this case.

How to set up and validate locally

  1. You can run the script locally with scripts/frontend/jest_ci.js, to verify it logs the expected resources.
  2. While it's possible to replicate CI runs locally, it's sufficiently fiddly that it's unlikely to truly verify how it will perform in CI. The best approach is to look at the example jobs above.
Edited by Mark Florian

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • assigned to @markrian

  • Mark Florian restored source branch extract-jest-ci-script

    restored source branch extract-jest-ci-script

  • Mark Florian restored source branch extract-jest-ci-script

    restored source branch extract-jest-ci-script

  • A deleted user added frontend label

    added frontend label

  • Pipeline Changes

    This merge request contains changes to the pipeline configuration for the GitLab project.

    Please consider the effect of the changes in this merge request on the following:

    Please consider communicating these changes to the broader team following the communication guideline for pipeline changes

    Reviewer roulette

    Category Reviewer Maintainer
    frontend @eduardobonet profile link current availability (UTC+1, 1 hour ahead of author) @deepika.guliani profile link current availability (UTC+5.5, 5.5 hours ahead of author)
    maintenanceworkflow for tooling, Danger, and RuboCop @dbiryukov profile link current availability (UTC+1, 1 hour ahead of author) @rymai profile link current availability (UTC+1, 1 hour ahead of author)
    ~"Pipeline configuration" Reviewer review is optional for ~"Pipeline configuration" @slashmanov profile link current availability (UTC+4, 4 hours ahead of author)
    ~"Tooling" Reviewer review is optional for ~"Tooling" @f_caplette profile link current availability (UTC-5, 5 hours behind author)

    Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.

    If needed, you can retry the :repeat: danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

    Edited by Ghost User
  • Mark Florian changed title from Remove unused jest:ci script to Refactor Jest CI scripts

    changed title from Remove unused jest:ci script to Refactor Jest CI scripts

  • Mark Florian changed the description

    changed the description

  • Mark Florian changed the description

    changed the description

  • Mark Florian added 1 commit

    added 1 commit

    • 2d74fe3d - Encapsulate CI Jest commands in a script

    Compare with previous version

  • Mark Florian added 1 commit

    added 1 commit

    • 1b8d3abf - Encapsulate CI Jest commands in a script

    Compare with previous version

  • Mark Florian changed the description

    changed the description

  • E2E Test Result Summary

    allure-report-publisher generated test report!

    e2e-test-on-cng: :white_check_mark: test report for 98166685

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Create      | 140    | 0      | 19      | 1     | 159   | ✅     |
    | Verify      | 49     | 0      | 16      | 0     | 65    | ✅     |
    | Package     | 30     | 0      | 14      | 0     | 44    | ✅     |
    | Monitor     | 8      | 0      | 12      | 0     | 20    | ✅     |
    | Ai-powered  | 0      | 0      | 2       | 0     | 2     | ➖     |
    | Govern      | 84     | 0      | 10      | 0     | 94    | ✅     |
    | Plan        | 86     | 0      | 8       | 0     | 94    | ✅     |
    | Manage      | 1      | 0      | 9       | 0     | 10    | ✅     |
    | Fulfillment | 2      | 0      | 7       | 0     | 9     | ✅     |
    | Data Stores | 33     | 0      | 10      | 0     | 43    | ✅     |
    | Secure      | 2      | 0      | 5       | 0     | 7     | ✅     |
    | Analytics   | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Release     | 5      | 0      | 1       | 0     | 6     | ✅     |
    | Configure   | 0      | 0      | 3       | 0     | 3     | ➖     |
    | Growth      | 0      | 0      | 2       | 0     | 2     | ➖     |
    | ModelOps    | 0      | 0      | 1       | 0     | 1     | ➖     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 442    | 0      | 119     | 1     | 561   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+

    e2e-test-on-gdk: :white_check_mark: test report for 98166685

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Monitor     | 8      | 0      | 12      | 0     | 20    | ✅     |
    | Package     | 25     | 0      | 13      | 0     | 38    | ✅     |
    | Govern      | 80     | 0      | 12      | 0     | 92    | ✅     |
    | Verify      | 48     | 0      | 17      | 0     | 65    | ✅     |
    | Create      | 135    | 0      | 20      | 0     | 155   | ✅     |
    | Data Stores | 33     | 0      | 10      | 0     | 43    | ✅     |
    | Plan        | 82     | 0      | 8       | 0     | 90    | ✅     |
    | Fulfillment | 2      | 0      | 7       | 0     | 9     | ✅     |
    | Configure   | 0      | 0      | 3       | 0     | 3     | ➖     |
    | Release     | 5      | 0      | 1       | 0     | 6     | ✅     |
    | Secure      | 4      | 0      | 3       | 0     | 7     | ✅     |
    | Analytics   | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Manage      | 1      | 0      | 9       | 0     | 10    | ✅     |
    | Ai-powered  | 0      | 0      | 2       | 0     | 2     | ➖     |
    | Growth      | 0      | 0      | 2       | 0     | 2     | ➖     |
    | ModelOps    | 0      | 0      | 1       | 0     | 1     | ➖     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 425    | 0      | 120     | 0     | 545   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    Edited by Ghost User
  • Mark Florian added 1 commit

    added 1 commit

    • a9438871 - Encapsulate CI Jest commands in a script

    Compare with previous version

  • Mark Florian changed the description

    changed the description

  • Lukas Eipert
  • Lukas Eipert
  • Lukas Eipert
  • Lukas Eipert
  • Lukas Eipert
  • Lukas Eipert requested review from @leipert

    requested review from @leipert

  • Lukas Eipert requested changes

    requested changes

  • Mark Florian added 1 commit

    added 1 commit

    • e9ae8667 - Encapsulate CI Jest commands in a script

    Compare with previous version

  • Mark Florian added 1 commit

    added 1 commit

    • 98166685 - Encapsulate CI Jest commands in a script

    Compare with previous version

  • Mark Florian changed the description

    changed the description

  • Mark Florian mentioned in merge request !174724 (closed)

    mentioned in merge request !174724 (closed)

  • Mark Florian mentioned in merge request !174725 (closed)

    mentioned in merge request !174725 (closed)

  • Mark Florian changed milestone to %17.7

    changed milestone to %17.7

  • Mark Florian
    • Resolved by Kev Kloss

      Thanks for the review, @leipert!

      I've pushed some changes and responded.

      Note that I still need to link to example jobs, which I'll take from this MR, and also !174724 (closed) and !174725 (closed). I'll do that tomorrow.

      Feel free to wait until after I've done that before taking another look, or look now. Whichever you prefer :smile: I'll re-request your review at that point anyway.

  • Mark Florian changed the description

    changed the description

  • Mark Florian changed the description

    changed the description

  • Mark Florian requested review from @leipert

    requested review from @leipert

  • Lukas Eipert
  • Lukas Eipert
  • Lukas Eipert approved this merge request

    approved this merge request

  • added pipelinetier-3 label and removed pipelinetier-1 label

  • Before you set this MR to auto-merge

    This merge request will progress on pipeline tiers until it reaches the last tier: pipelinetier-3. We will trigger a new pipeline for each transition to a higher tier.

    Before you set this MR to auto-merge, please check the following:

    • You are the last maintainer of this merge request
    • The latest pipeline for this merge request is pipelinetier-3 (You can find which tier it is in the pipeline name)
    • This pipeline is recent enough (created in the last 8 hours)

    If all the criteria above apply, please set auto-merge for this merge request.

    See pipeline tiers and merging a merge request for more details.

  • mentioned in issue #508139 (closed)

  • mentioned in issue #508762 (closed)

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading