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

ci: separate VRT pipelines in GHA compliant pattern for future enablement #33534

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Hotell
Copy link
Contributor

@Hotell Hotell commented Dec 31, 2024

Previous Behavior

New Behavior

💡 NOTE: both of these pipelines will be disabled until we have compliant vrt tooling

Splits/Implements VRT pipelines in 2 to follow GHA pattern on forks for future enablement.

  1. generating screenshots on affected projects on Forks (works after merge)
image
  1. running vrt diffing and commenting from master branch (doesn't work untill we have new vrt diff tool)

Out of scope:

  • updating baseline screenshot diffs
    • we can/will use ADO pipeline for now from master (no Forks)

Related Issue(s)

Copy link

github-actions bot commented Dec 31, 2024

📊 Bundle size report

✅ No changes found

Copy link

Pull request demo site: URL

@Hotell Hotell closed this Dec 31, 2024
@Hotell Hotell reopened this Dec 31, 2024
@github-actions github-actions bot added the CI label Dec 31, 2024
@Hotell Hotell force-pushed the ci/migrate-to-gha-vrt/1 branch from 36fc7a7 to 4768a9f Compare December 31, 2024 10:55
@Hotell Hotell changed the title test: change button vrt to observe ci ci: enable VRT pipelines without diffing capabilities Dec 31, 2024
@Hotell Hotell changed the title ci: enable VRT pipelines without diffing capabilities ci: separate VRT pipelines in GHA compliant pattern for future enablement Dec 31, 2024
- run: yarn playwright install --with-deps

- name: Run VR tests (generate screenshots)
run: yarn nx affected -t test-vr --nxBail
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this saves significant resources

  • before: install,playwright setup, scrernshot generation was done N times ( per affected projects )
  • after: setup is invoked only once

echo "MAKE THIS WORK"
npx vr-approval-cli@0.4.11 run-diff --screenshotsDirectory ./screenshots --buildType pr --clientType "FLUENTUI" --threshold '0.04' --cumThreshold '1'

# 💡 NOTE:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note 👇

actions: 'read'

jobs:
run_vr_diff:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is preparation of generated screenshots on forks and PR id, that will be used in vrt diffing tool once we have new version

@@ -84,58 +84,64 @@ runs:
path: screenshots

# ==========================================================
# STEPS BELOW WILL FAIL TO RUN ON GITHUB ACTIONS - see TODOs
# STEPS BELOW WILL FAIL TO RUN ON GITHUB ACTIONS - see @TODOs
Copy link
Contributor Author

Choose a reason for hiding this comment

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

commenting steps that would not work with this composite action for future reference for us and VRT team

* @param {import('../../scripts/triage-bot/src/types.ts').GithubScriptsParams & {config:{projects:string[]}} } options
* @returns
*/
async function main(options) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • aggregates screenshots generated during nx affected under /screenshots directory
  • generates screenshots-report.json with metadata for further processing within *-comment workflow ( wish this functionality would be baked in within the vrt tool like we have for bundle size )

@@ -12,7 +8,7 @@ concurrency:
cancel-in-progress: true

env:
NX_PARALLEL: 4 # ubuntu-latest = 4-core CPU / 16 GB of RAM | macos-14-xlarge (arm) = 6-core CPU / 14 GB of RAM
NX_PARALLEL: 6 # ubuntu-latest = 4-core CPU / 16 GB of RAM | macos-14-xlarge (arm) = 6-core CPU / 14 GB of RAM
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can use powerful ARM agents ( generation is executed via webpack and storywright ( playwright ) )

@Hotell Hotell force-pushed the ci/migrate-to-gha-vrt/1 branch from afd9dbc to 9412478 Compare January 2, 2025 11:00
@Hotell Hotell marked this pull request as ready for review January 2, 2025 11:37
@Hotell Hotell requested a review from a team as a code owner January 2, 2025 11:37
@dmytrokirpa dmytrokirpa self-requested a review January 2, 2025 12:28
});

console.info(`✅ ${screenshotsPath} contents copied to ${destinationFolder}`);
report[project] = { path: project };
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it a map of the affected vr-tests-* app projects? Not sure if it'd be useful to include it in the PR comment. I know that we don't have this info just yet, but we might want to post a link to the vr-tool diff app instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants