tests: run lighthouse against preview deployments in CI (#107)
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
name: live
|
||||||
|
|
||||||
|
on: [deployment_status]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lighthouse:
|
||||||
|
name: lighthouse
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event.deployment_status.state == 'success' && github.event.deployment_status.creator.login == 'deno-deploy[bot]'
|
||||||
|
|
||||||
|
env:
|
||||||
|
URL: ${{ github.event.deployment_status.environment_url }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Node.js 16.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 16.x
|
||||||
|
|
||||||
|
- name: Install Lighthouse CI
|
||||||
|
run: npm install -g @lhci/cli@0.9.x
|
||||||
|
|
||||||
|
- name: Run Lighthouse
|
||||||
|
run: lhci autorun --collect.url="$URL" --upload.target="temporary-public-storage"
|
||||||
|
env:
|
||||||
|
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
|
||||||
@@ -26,7 +26,7 @@ export default function MainPage() {
|
|||||||
function Hero() {
|
function Hero() {
|
||||||
const container = tw`w-full h-64 flex justify-center items-center flex-col`;
|
const container = tw`w-full h-64 flex justify-center items-center flex-col`;
|
||||||
const title = tw
|
const title = tw
|
||||||
`text(4xl sm:5xl lg:6xl gray-900) sm:tracking-tight font-extrabold`;
|
`text(4xl sm:5xl lg:6xl gray-900 center) sm:tracking-tight font-extrabold`;
|
||||||
const subtitle = tw`mt-4 text(2xl gray-600)`;
|
const subtitle = tw`mt-4 text(2xl gray-600)`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user