-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing homepage broken image (#2363)
* Fixing homepage broken image Affected Route: `/` Fixed : #2362 Adding device sizes array for SIZE props. https://nextjs.org/docs/pages/api-reference/components/image#devicesizes * Adding mobile browser for the Playwright * Adding browser for mobile safari * Modifying tests for the mobile screen * Running the template on pr trigger * Adding env for the template * Adding more attempts * Adding waituntil prop * Adding chromium browser for mobile viewport * Undo the changes in the template * Changing attempts to 2 from 4 * Updating the device name * Adding new pipeline to check images daily * Fixing syntax for the daily run * Adding checkout step * Adding a new step to extract env * echoing echo in a step * Adding shell to pwsh * Adding a new step to create issue * Adding checkout step * echoing test result * Adding guard to create an issue and removing custom reporter for the artifact * Extracting the output without reporter * Echoing test result in the logs * Changing the echo into write-ouput * Converting output into a string * Running test for the creating issue with right artifact * Fixing indentation in the issue template * Removing project and status from md * Removing custom reporter file * Removing trigger for PR and adding input for dispatch * Removing env step * Removing pull request trigger * Commenting out size prop * Update components/blocks/clientLogos.tsx Co-authored-by: Matt Wicks [SSW] <[email protected]> * Adding a new step to add testpass value * Removing PR trigger * Adding create an issue in daily image test * Removing the invalid props for steps * Adding PR trigger for testing * Removing the create an issue to test the output variables * Adding the default value for the testpassed * Adding the chain condition within the block * Adding create issue step back in the flow * Matt's feedback * Removing the test pass step and related variables * Test run * Adding PR trigger for test * Adding typo for test * Adding seo-pr for test * Adding typo to test * Adding typo to test * Adding failure step to get the outcome * Passing props on failure * Adding continue on error * Adding testing output job * Changing the step name * removing single quote * Adding the step to output variable value * Changing the run value * Wrapping the value before publishing it * Adding output * echoing create issue value * Changing the value type * adding env to get the default value * Changing the condition * Adding true check for the job * removing double quote for true * adding output value for create issue * Adding new false for consistency * Adding extra condition * Wrapping with the variable name * removing condition * Adding extra echo * adding env for the github action * removing echo * adding quote to create issue variable * removing continue on true * Adding variable for the continue on error * failure condition for the job * Removing redundant steps * Updating the variables and cleanup * Removing error * removing pull request trigger * Adding step to checkout repo for the template --------- Co-authored-by: Matt Wicks [SSW] <[email protected]>
- Loading branch information
1 parent
fadf3f5
commit b78bc53
Showing
13 changed files
with
122 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: 🐛 Auto - Bug Report | ||
about: Report a bug | ||
title: "🐛 {{ env.TITLE }}" | ||
labels: "Type: Bug" | ||
assignees: "" | ||
--- | ||
|
||
@SSWConsulting/ssw-website-maintainers | ||
|
||
**Describe the bug** | ||
Pipeline has detected some broken images on the website. | ||
|
||
- [ ] Investigate and fix it asap. | ||
|
||
**Download the Playwright Artifact:** | ||
https://github.com/SSWConsulting/SSW.Website/actions/runs/{{env.GITHUB_RUN_ID}}/artifacts/{{ env.ARTIFACT_ID}} for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Daily broken images check | ||
|
||
on: | ||
schedule: | ||
# Every Weekday at 8 AM AEDT - https://cron.help/#0_21_*_*_SUN-THU | ||
- cron: "0 21 * * SUN-THU" | ||
workflow_dispatch: | ||
inputs: | ||
deploy_url: | ||
description: "The URL of the site to test" | ||
required: true | ||
tests_to_run: | ||
description: "The tests to run" | ||
required: true | ||
create_issue: | ||
description: "Create an issue if there are broken images" | ||
type: boolean | ||
default: true | ||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
env: | ||
create_issue: ${{ github.event.inputs.create_issue || true }} | ||
|
||
jobs: | ||
check-broken-images: | ||
name: Run Playwright Tests | ||
uses: ./.github/workflows/template-ui-tests.yml | ||
with: | ||
deploy_url: ${{ inputs.deploy_url || 'https://ssw.com.au' }} | ||
tests_to_run: ${{ inputs.tests_to_run || 'images'}} | ||
continue-on-failure: true | ||
|
||
env-output: | ||
name: Env Output | ||
runs-on: ubuntu-latest | ||
needs: check-broken-images | ||
outputs: | ||
create_issue: ${{ steps.envs.outputs.create_issue }} | ||
steps: | ||
- name: Env variables into Output # this is necessary as env variables are not accessible at Job level | ||
id: envs | ||
shell: pwsh | ||
run: | | ||
echo "Test passed : ${{ needs.check-broken-images.outputs.testPassed }}" | ||
echo "Artifact Id: ${{ needs.check-broken-images.outputs.artifact-id }}" | ||
$create_issue='${{ env.create_issue }}' | ||
echo "create_issue=$create_issue" >> $env:GITHUB_OUTPUT | ||
create-an-issue: | ||
name: GitHub Issue | ||
runs-on: ubuntu-latest | ||
needs: | ||
- check-broken-images | ||
- env-output | ||
if: ${{ needs.env-output.outputs.create_issue == 'true' && needs.check-broken-images.outputs.testPassed == 'false'}} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Create an Issue | ||
uses: JasonEtco/create-an-issue@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TITLE: "Broken Images on Homepage" | ||
ARTIFACT_ID: ${{ needs.check-broken-images.outputs.artifact-id }} | ||
GITHUB_RUN_ID: ${{ github.run_id }} | ||
with: | ||
filename: .github/ISSUE_TEMPLATE/auto_bug_report.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,6 @@ jobs: | |
uses: xom9ikk/dotenv@v2 | ||
with: | ||
path: ./.github | ||
load-mode: strict | ||
|
||
- name: Build | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,6 @@ jobs: | |
uses: xom9ikk/dotenv@v2 | ||
with: | ||
path: ./.github | ||
load-mode: strict | ||
|
||
- name: Build | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters