-
Notifications
You must be signed in to change notification settings - Fork 1
add workflow #5
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
base: main
Are you sure you want to change the base?
add workflow #5
Conversation
Refactor GitHub Actions workflow for dependency updates. Simplify job structure, improve naming conventions, and enhance logging.
| - name: Install Node deps (PR branch) | ||
| if: ${{ steps.cpr.outputs.pull-request-number != '' }} | ||
| run: | | ||
| npm ci || npm install | ||
|
|
||
| - name: Re-create venv & install Python deps (PR branch) | ||
| if: ${{ steps.cpr.outputs.pull-request-number != '' }} | ||
| run: | | ||
| python -m venv .venv | ||
| source .venv/bin/activate | ||
| python -m pip install --upgrade pip setuptools wheel | ||
| pip install -r requirements.txt | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step is repeated, can we optimise this. Check if we can use cache here? Something like
uses: actions/cache@v4, This will decrease the run time almost by 1-2 minute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a condition to check if the requirements exists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a pull request exists, still this is redundant right ???
| if: ${{ steps.cpr.outputs.pull-request-number == '' }} | ||
| run: | | ||
| echo "No changes detected; no PR opened. Skipping Percy run." | ||
| echo "pr_created=0" >> $GITHUB_OUTPUT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pr_created value is not used anywhere in the later code, is it required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
| }); | ||
|
|
||
| - name: Upload Percy logs | ||
| if: always() && ${{ steps.cpr.outputs.pull-request-number != '' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if: always() && ${{ steps.cpr.outputs.pull-request-number != '' }} | |
| if: always() && steps.cpr.outputs.pull-request-number != '' |
The statement inside of if is always treated as expression -- Check if we can use ^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
|
@pranavz28 have you tested this workflow? https://github.com/percy/example-percy-playwright-python/actions/runs/18311215267/workflow -> This workflow is failing, please check this. |
This pull request introduces a new GitHub Actions workflow to automate dependency updates for both Node and Python environments, and integrates visual regression testing using Percy Web. The workflow runs weekly and on demand, automatically bumps dependencies, creates a pull request if changes are detected, and runs Percy Web tests on the update branch. It also provides feedback on the status of Percy builds directly in the pull request.
Automated Dependency Management
.github/workflows/dependency-update.yml) that updates Node (vianpm-check-updates) and Python dependencies (viapip), and ensures the latest stable version of@percy/cliis installed.Percy Web Integration