report test #14
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: 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, github } = require('@actions/github'); | |
const artifactLink = 'link-to-your-artifact'; | |
const commentBody = `### Lighthouse Report\n\nThe Lighthouse report is available [here](${artifactLink}).`; | |
github.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: commentBody | |
}); |