fix(tooltip): update default offset to match Spectrum defs #5831
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: Performance check | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
comment-previews: | |
name: Comments preview URLs | |
# We can't currently run benchmarks on PRs from forked repos, because the | |
# tachometer action reports results by posting a comment, and we can't post | |
# comments without a github token. | |
if: github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: main | |
- uses: actions/checkout@v3 | |
- name: Setup Node 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
- name: Post Previews | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const { buildPreviewURLComment } = await import('${{ github.workspace }}/tasks/build-preview-urls-comment.js'); | |
const body = buildPreviewURLComment(process.env.GITHUB_HEAD_REF); | |
github.rest.issues.listComments({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
}).then(({data}) => { | |
const priorComment = data.find(comment => comment.body.startsWith('# Branch Preview')); | |
if (priorComment) { | |
github.rest.issues.updateComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
comment_id: priorComment.id, | |
body | |
}); | |
} else { | |
github.rest.issues.createComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
body | |
}); | |
} | |
}); | |
compare-firefox: | |
name: Compare performance to latest release on Firefox | |
# We can't currently run benchmarks on PRs from forked repos, because the | |
# tachometer action reports results by posting a comment, and we can't post | |
# comments without a github token. | |
if: github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
- uses: actions/checkout@v3 | |
- name: Setup Node 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
- run: firefox --version | |
- name: Tachometer the changed packages | |
run: yarn test:changed --browser=firefox | |
- name: Make at least one results file | |
run: touch tachometer.ran.txt | |
- name: Archive Firefox tachometer results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tachometer-results | |
path: | | |
tach-results.firefox.*.json | |
tachometer.ran.txt | |
compare-chrome: | |
name: Compare performance to latest release on Chrome | |
# We can't currently run benchmarks on PRs from forked repos, because the | |
# tachometer action reports results by posting a comment, and we can't post | |
# comments without a github token. | |
if: github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
- uses: actions/checkout@v3 | |
- name: Setup Node 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
- name: Tachometer the changed packages | |
run: yarn test:changed | |
- name: Make at least one results file | |
run: touch tachometer.ran.txt | |
- name: Archive Chrome tachometer results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tachometer-results | |
path: | | |
tach-results.*.json | |
tachometer.ran.txt | |
comment-performance: | |
name: Comment performance results | |
needs: [compare-chrome, compare-firefox] | |
# We can't currently run benchmarks on PRs from forked repos, because the | |
# tachometer action reports results by posting a comment, and we can't post | |
# comments without a github token. | |
if: github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
- uses: actions/checkout@v3 | |
- name: Setup Node 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
- name: Retrieve tachometer results archives | |
uses: actions/download-artifact@v3 | |
with: | |
name: tachometer-results | |
- name: Post Performance | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const { buildTachometerComment } = await import('${{ github.workspace }}/tasks/build-tachometer-comment.js'); | |
const body = buildTachometerComment(); | |
github.rest.issues.listComments({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
}).then(({data}) => { | |
const priorComment = data.find(comment => comment.body.startsWith('# Tachometer results')); | |
if (priorComment) { | |
github.rest.issues.updateComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
comment_id: priorComment.id, | |
body | |
}); | |
} else { | |
github.rest.issues.createComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
body | |
}); | |
} | |
}); |