Skip to content

CI: Run e2e tests against two Grafana versions#1419

Merged
sunker merged 20 commits intomainfrom
create-plugin/include-lower-bound
Feb 3, 2025
Merged

CI: Run e2e tests against two Grafana versions#1419
sunker merged 20 commits intomainfrom
create-plugin/include-lower-bound

Conversation

@sunker
Copy link
Copy Markdown
Contributor

@sunker sunker commented Dec 19, 2024

What this PR does / why we need it:

This PR extends the CI workflow so that the e2e tests are not only run against the latest version of Grafana, but also against the lowest supported Grafana version. In addition to that, the reports are now being deployed to GH pages.

Note that I have forced two tests to fail just to showcase what it looks like (see PR comment below).

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@sunker sunker added the no-changelog Don't include in changelog and version calculations label Dec 19, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 19, 2024

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs.

@sunker sunker force-pushed the create-plugin/include-lower-bound branch 5 times, most recently from 45f43a7 to 2ab7203 Compare December 19, 2024 14:14
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Dec 20, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ sunker
❌ grafanabot
You have signed the CLA already but the status is still pending? Let us recheck it.

@sunker sunker force-pushed the create-plugin/include-lower-bound branch 3 times, most recently from 5389546 to 522daa0 Compare December 20, 2024 12:45
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This speeds up the CI process a bit. Seems to work fine in GH workflows

@sunker sunker marked this pull request as ready for review January 14, 2025 14:26
@sunker sunker requested a review from a team as a code owner January 14, 2025 14:26
Copy link
Copy Markdown
Collaborator

@mckn mckn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Should we also add a check if MIN_VERSION and LATEST_VERSION is the same, then we probably can skip running MIN_VERSION tests.

@sunker
Copy link
Copy Markdown
Contributor Author

sunker commented Jan 31, 2025

LGTM! Should we also add a check if MIN_VERSION and LATEST_VERSION is the same, then we probably can skip running MIN_VERSION tests.

@mckn I don't think it can be the same. We set grafanaDependency manually and it should always be the last minor of the previous major.

@sunker sunker force-pushed the create-plugin/include-lower-bound branch from 522daa0 to 6d5bfb2 Compare January 31, 2025 07:42
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml
working-directory: ./${{ matrix.workingDir }}

- name: Wait for grafana server (${{ steps.min-version.outputs.MIN_VERSION }})
uses: grafana/plugin-actions/wait-for-grafana@main

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow

Unpinned 3rd party Action 'Node CI' step [Uses Step](1) uses 'grafana/plugin-actions/wait-for-grafana' with ref 'main', not a pinned commit hash
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml
working-directory: ./${{ matrix.workingDir }}

- name: Wait for grafana server
- name: Wait for grafana server (latest)

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow

Unpinned 3rd party Action 'Node CI' step [Uses Step](1) uses 'grafana/plugin-actions/wait-for-grafana' with ref 'main', not a pinned commit hash
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml
steps:
- uses: actions/checkout@v4
- name: Publish report
uses: grafana/plugin-actions/playwright-gh-pages/deploy-report-pages@main

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow

Unpinned 3rd party Action 'Node CI' step [Uses Step](1) uses 'grafana/plugin-actions/playwright-gh-pages/deploy-report-pages' with ref 'main', not a pinned commit hash
@sunker sunker force-pushed the create-plugin/include-lower-bound branch from 1c98109 to 01013b4 Compare February 3, 2025 08:53
Comment thread .github/workflows/ci.yml
working-directory: ./${{ matrix.workingDir }}

- name: Upload e2e test summary (latest)
uses: grafana/plugin-actions/playwright-gh-pages/upload-report-artifacts@main

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow

Unpinned 3rd party Action 'Node CI' step [Uses Step](1) uses 'grafana/plugin-actions/playwright-gh-pages/upload-report-artifacts' with ref 'main', not a pinned commit hash
Comment thread .github/workflows/ci.yml
working-directory: ./${{ matrix.workingDir }}

- name: Upload e2e test summary (${{ steps.min-version.outputs.MIN_VERSION }})
uses: grafana/plugin-actions/playwright-gh-pages/upload-report-artifacts@main

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow

Unpinned 3rd party Action 'Node CI' step [Uses Step](1) uses 'grafana/plugin-actions/playwright-gh-pages/upload-report-artifacts' with ref 'main', not a pinned commit hash
@sunker sunker requested a review from mckn February 3, 2025 11:52
Copy link
Copy Markdown
Collaborator

@mckn mckn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sunker sunker merged commit fc67153 into main Feb 3, 2025
@sunker sunker deleted the create-plugin/include-lower-bound branch February 3, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Don't include in changelog and version calculations

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants