-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: all test cases not passing for commit on external repository #3838
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
Changes from all commits
74c521d
c185be3
fc34c09
76aecf9
4253359
c80bc47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,51 +14,45 @@ jobs: | |||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||
| - if: > | ||||||||||||||||||||||||||||||||||||
| !github.event.pull_request.draft && !( | ||||||||||||||||||||||||||||||||||||
| (github.actor == 'asyncapi-bot' && ( | ||||||||||||||||||||||||||||||||||||
| startsWith(github.event.pull_request.title, 'ci: update global workflows') || | ||||||||||||||||||||||||||||||||||||
| startsWith(github.event.pull_request.title, 'chore: update code of conduct') || | ||||||||||||||||||||||||||||||||||||
| startsWith(github.event.pull_request.title, 'ci: update global contribution guide') || | ||||||||||||||||||||||||||||||||||||
| startsWith(github.event.pull_request.title, 'ci: update workflows for go projects') || | ||||||||||||||||||||||||||||||||||||
| startsWith(github.event.pull_request.title, 'ci: update workflows for nodejs projects') || | ||||||||||||||||||||||||||||||||||||
| startsWith(github.event.pull_request.title, 'ci: update release-related workflows for nodejs projects') || | ||||||||||||||||||||||||||||||||||||
| startsWith(github.event.pull_request.title, 'ci: update semantic release config file') || | ||||||||||||||||||||||||||||||||||||
| startsWith(github.event.pull_request.title, 'ci: update generic workflows') || | ||||||||||||||||||||||||||||||||||||
| startsWith(github.event.pull_request.title, 'ci: update workflows for docker-based projects') || | ||||||||||||||||||||||||||||||||||||
| startsWith(github.event.pull_request.title, 'chore(release):') | ||||||||||||||||||||||||||||||||||||
| )) || | ||||||||||||||||||||||||||||||||||||
| (github.actor == 'allcontributors[bot]' && | ||||||||||||||||||||||||||||||||||||
| startsWith(github.event.pull_request.title, 'docs: add') | ||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||
| github.actor == 'asyncapi-bot' || github.actor == 'allcontributors[bot]' | ||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||
| id: should_run | ||||||||||||||||||||||||||||||||||||
| name: Should Run | ||||||||||||||||||||||||||||||||||||
| run: echo "shouldrun=true" >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||
| run: echo "shouldrun=true" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| - if: steps.should_run.outputs.shouldrun == 'true' | ||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v3 | ||||||||||||||||||||||||||||||||||||
| - if: env.shouldrun == 'true' | ||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| - if: steps.should_run.outputs.shouldrun == 'true' | ||||||||||||||||||||||||||||||||||||
| - if: env.shouldrun == 'true' | ||||||||||||||||||||||||||||||||||||
| name: Await Netlify Preview | ||||||||||||||||||||||||||||||||||||
| uses: jakepartusch/wait-for-netlify-action@f1e137043864b9ab9034ae3a5adc1c108e3f1a48 #version 1.4 https://github.com/JakePartusch/wait-for-netlify-action/releases/tag/v1.4 | ||||||||||||||||||||||||||||||||||||
| uses: jakepartusch/wait-for-netlify-action@v1.4 | ||||||||||||||||||||||||||||||||||||
| id: netlify | ||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||
| site_name: asyncapi-website | ||||||||||||||||||||||||||||||||||||
| max_timeout: 600 | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| - if: steps.should_run.outputs.shouldrun == 'true' | ||||||||||||||||||||||||||||||||||||
| - if: env.shouldrun == 'true' | ||||||||||||||||||||||||||||||||||||
| name: Lighthouse Audit | ||||||||||||||||||||||||||||||||||||
| id: lighthouse_audit | ||||||||||||||||||||||||||||||||||||
| uses: treosh/lighthouse-ci-action@03becbfc543944dd6e7534f7ff768abb8a296826 #version 10.1 https://github.com/treosh/lighthouse-ci-action/releases/tag/10.1.0 | ||||||||||||||||||||||||||||||||||||
| uses: treosh/lighthouse-ci-action@10.1.0 | ||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||
| urls: | | ||||||||||||||||||||||||||||||||||||
| https://deploy-preview-$PR_NUMBER--asyncapi-website.netlify.app/ | ||||||||||||||||||||||||||||||||||||
| https://deploy-preview-${{ github.event.pull_request.number }}--asyncapi-website.netlify.app/ | ||||||||||||||||||||||||||||||||||||
| configPath: ./.github/workflows/lighthouserc.json | ||||||||||||||||||||||||||||||||||||
| uploadArtifacts: true | ||||||||||||||||||||||||||||||||||||
| uploadArtifacts: false | ||||||||||||||||||||||||||||||||||||
| temporaryPublicStorage: true | ||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||
| PR_NUMBER: ${{ github.event.pull_request.number}} | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| - if: steps.should_run.outputs.shouldrun == 'true' | ||||||||||||||||||||||||||||||||||||
| - if: env.shouldrun == 'true' | ||||||||||||||||||||||||||||||||||||
| name: Upload Lighthouse Artifacts | ||||||||||||||||||||||||||||||||||||
| uses: actions/upload-artifact@v3 | ||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||
| name: lighthouse-results | ||||||||||||||||||||||||||||||||||||
| path: ./lighthouse-results | ||||||||||||||||||||||||||||||||||||
| continue-on-error: true | ||||||||||||||||||||||||||||||||||||
| retry: 3 | ||||||||||||||||||||||||||||||||||||
| timeout-minutes: 10 | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
|
Comment on lines
+45
to
+54
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Upload Lighthouse Artifacts Step: Version Update & Invalid Key. Proposed diff: - retry: 3📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.4)47-47: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) 52-52: unexpected key "retry" for "step" section. expected one of "continue-on-error", "env", "id", "if", "name", "run", "shell", "timeout-minutes", "uses", "with", "working-directory" (syntax-check) |
||||||||||||||||||||||||||||||||||||
| - if: env.shouldrun == 'true' | ||||||||||||||||||||||||||||||||||||
| name: Lighthouse Score Report | ||||||||||||||||||||||||||||||||||||
| id: lighthouse_score_report | ||||||||||||||||||||||||||||||||||||
| uses: actions/github-script@v6 | ||||||||||||||||||||||||||||||||||||
|
|
@@ -71,25 +65,22 @@ jobs: | |||||||||||||||||||||||||||||||||||
| Object.keys(result).forEach(key => result[key] = formatResult(result[key])) | ||||||||||||||||||||||||||||||||||||
| const score = res => res >= 90 ? '🟢' : res >= 50 ? '🟠' : '🔴' | ||||||||||||||||||||||||||||||||||||
| const comment = [ | ||||||||||||||||||||||||||||||||||||
| `⚡️ [Lighthouse report](${Object.values(links)[0]}) for the changes in this PR:`, | ||||||||||||||||||||||||||||||||||||
| `⚡️ [Lighthouse report](${Object.values(links)[0]}) for this PR:`, | ||||||||||||||||||||||||||||||||||||
| '| Category | Score |', | ||||||||||||||||||||||||||||||||||||
| '| --- | --- |', | ||||||||||||||||||||||||||||||||||||
| `| ${score(result.performance)} Performance | ${result.performance} |`, | ||||||||||||||||||||||||||||||||||||
| `| ${score(result.accessibility)} Accessibility | ${result.accessibility} |`, | ||||||||||||||||||||||||||||||||||||
| `| ${score(result['best-practices'])} Best practices | ${result['best-practices']} |`, | ||||||||||||||||||||||||||||||||||||
| `| ${score(result['best-practices'])} Best Practices | ${result['best-practices']} |`, | ||||||||||||||||||||||||||||||||||||
| `| ${score(result.seo)} SEO | ${result.seo} |`, | ||||||||||||||||||||||||||||||||||||
| `| ${score(result.pwa)} PWA | ${result.pwa} |`, | ||||||||||||||||||||||||||||||||||||
| ' ', | ||||||||||||||||||||||||||||||||||||
| `*Lighthouse ran on [${Object.keys(links)[0]}](${Object.keys(links)[0]})*` | ||||||||||||||||||||||||||||||||||||
| `| ${score(result.pwa)} PWA | ${result.pwa} |` | ||||||||||||||||||||||||||||||||||||
| ].join('\n') | ||||||||||||||||||||||||||||||||||||
| core.setOutput("comment", comment); | ||||||||||||||||||||||||||||||||||||
| core.setOutput("comment", comment); | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| - if: steps.should_run.outputs.shouldrun == 'true' | ||||||||||||||||||||||||||||||||||||
| - if: env.shouldrun == 'true' | ||||||||||||||||||||||||||||||||||||
| name: LightHouse Statistic Comment | ||||||||||||||||||||||||||||||||||||
| id: lighthouse_statistic_comment | ||||||||||||||||||||||||||||||||||||
| uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd # version 2.8 https://github.com/marocchino/sticky-pull-request-comment/releases/tag/v2.8.0 | ||||||||||||||||||||||||||||||||||||
| uses: marocchino/sticky-pull-request-comment@v2.8.0 | ||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||||||||||||||||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||
| number: ${{ github.event.pull_request.number }} | ||||||||||||||||||||||||||||||||||||
| header: lighthouse | ||||||||||||||||||||||||||||||||||||
| message: ${{ steps.lighthouse_score_report.outputs.comment }} | ||||||||||||||||||||||||||||||||||||
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.
🛠️ Refactor suggestion
Setting Environment Variable for 'shouldrun'.
Using
$GITHUB_ENVto setshouldrunis consistent with our updated practices. Please check and remove any trailing spaces that might be present after this command to satisfy YAML linting requirements.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 22-22: trailing spaces
(trailing-spaces)