-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (32 loc) · 1.27 KB
/
lighthouse.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Lighthouse Report
on: [pull_request]
jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: mkdir /tmp/artifacts
- name: Run Lighthouse
uses: foo-software/lighthouse-check-action@master
with:
outputDirectory: /tmp/artifacts
urls: 'https://quickstarts.teradata.com,https://quickstarts.teradata.com/nos.html'
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: Lighthouse reports
path: /tmp/artifacts
- name: Comment on PR
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { context: repoContext, github } = require('@actions/github');
const artifactLink = `${process.env.GITHUB_SERVER_URL}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/artifacts`;
const commentBody = `### Lighthouse Report\n\nThe Lighthouse report is available [here](${artifactLink}).`;
github.issues.createComment({
issue_number: repoContext.issue.number,
owner: repoContext.repo.owner,
repo: repoContext.repo.repo,
body: commentBody
});