Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MTM-59397] As a plugin developer I want to have a workflow that will collect shell versions and run cypress tests against them #31

Open
wants to merge 310 commits into
base: main
Choose a base branch
from

Conversation

jdreSAG
Copy link
Collaborator

@jdreSAG jdreSAG commented May 29, 2024

Main element of this feature is test-plugins-against-cockpit.yml. it is triggered in two ways:

  • on pull_request: it collects shell versions (job collect-shell-versions; by default last three yearly releases, but for now y2025-lts, y2024-lts and 1018.0-lts) and build and uploads plugins (job build-plugins); then it runs parallel jobs (run-tests-against-shell) that run cypress tests against cockpit
  • on schedule (currently with cron: '15 4 * * 1-5', so since monday to friday, on 4:15AM UTC): it does almost the same, but at the beginning of run-tests-against-shell it checks if particular version of shell with plugins version was already successfully tested; if entry in cache is found, tests are skipped; if not found or there is newer version of shell or plugins, tests are ran and json file with result is created, eg. for 1018.0-lts there is 1018.0-lts-3.0.1.json file created in cache with content of :
    { "shellVersion": "1018.0.269", "pluginsVersion": "3.0.1", "lastSuccess": "24-07-10T12:41:08Z" }

New workflow uses reusable action from repo https://github.com/SoftwareAG/plugins-e2e-setup (that also needs review)

Second important part is how cypress tests are now ran. see cypress/README.md for details how to run tests

Proposed changes

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@jdreSAG jdreSAG self-assigned this May 29, 2024
@jdreSAG jdreSAG marked this pull request as ready for review May 31, 2024 05:37
@jdreSAG jdreSAG changed the base branch from main to no-issue/move-to-ng-cli June 19, 2024 08:57
Folder name fix.

n/a
Node version fix.

n/a
Workflo run cypress tests

n/a
Workflo run cypress tests use mocked requests

n/a
Workflow run cypress tests use mocked requests- login fix

n/a
Workflow iterate over shell versions debug

n/a
Workflow iterate over shell versions with build in second job

n/a
Simplify collect-shell-versions job.

n/a
Refactor workflow for better readability.

n/a
Build plugins once per workflow and reuse it.

n/a
Build plugins once per workflow and reuse it -path fix

n/a
Build plugins once per workflow and reuse it - c8yctrl fix

n/a
Rename workflow file

n/a
TODOS added or removed.

n/a
All steps to run tests against cocckpit are separate jobs in separate files.

n/a
@jdreSAG jdreSAG requested review from reey, janhommes, eniosultan and DawidSAG and removed request for reey, eniosultan, suyog-wani and DawidSAG August 27, 2024 06:05
Add docs describing repository setup for testing against shell

n/a
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.

None yet

3 participants