Limit data URLs in css-variables #335
Workflow file for this 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
name: Tests | |
on: | |
pull_request_target: | |
branches: | |
- main | |
paths-ignore: | |
- "**/*.md" | |
workflow_dispatch: | |
jobs: | |
test: | |
name: WebPageTest Test Cases | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: npm install jest webpagetest | |
- name: Run WebPageTest with unit tests | |
run: npm test | |
env: | |
WPT_SERVER: "webpagetest.httparchive.org" | |
WPT_API_KEY: ${{ secrets.HA_API_KEY }} | |
- name: Run WebPageTest for more websites | |
run: node tests/wpt.js | |
env: | |
WPT_SERVER: "webpagetest.httparchive.org" | |
WPT_API_KEY: ${{ secrets.HA_API_KEY }} | |
PR_BODY: ${{ github.event.pull_request.body }} | |
- name: Upload artifact if needed | |
id: artifact-upload-step | |
uses: actions/upload-artifact@v4 | |
with: | |
path: artifact.md | |
- name: Update comment.md | |
run: | | |
if grep -q "{artifact-url}" comment.md; then | |
artifact_url="${{ steps.artifact-upload-step.outputs.artifact-url }}" | |
sed -i "s|{artifact-url}|$artifact_url|g" comment.md | |
echo "Placeholder {artifact-url} replaced with a value: $artifact_url." | |
else | |
echo "No placeholder {artifact-url} found in comment.md." | |
fi | |
- name: Add comment to PR | |
uses: mshick/add-pr-comment@v2 | |
if: always() | |
with: | |
refresh-message-position: true | |
message-path: comment.md |