Skip to content

Commit

Permalink
wip: Store Lighthouse results
Browse files Browse the repository at this point in the history
  • Loading branch information
flozia committed Jan 16, 2025
1 parent 4dd2c01 commit 329c180
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/lighthouse_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ on:
environment:
description: 'Environment to run LHCI against'
required: false
default: 'prod'
default: 'stage'
type: choice
options:
- stage
- prod
jobs:
lhci:
name: Lighthouse Report - ${{ inputs.environment != null && inputs.environment || 'prod' }}
name: Lighthouse Report - ${{ inputs.environment != null && inputs.environment || 'stage' }}
runs-on: ubuntu-latest
environment: ${{ inputs.environment != null && inputs.environment || 'stage' }}
permissions:
contents: read
id-token: write
Expand All @@ -40,7 +41,7 @@ jobs:
with:
workload_identity_provider: ${{ secrets.GC_LIGHTHOUSE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GC_LIGHTHOUSE_SERVICE_ACCOUNT }}
env:
BQ_LIGHTHOUSE_DATASET: ${{ secrets.BQ_LIGHTHOUSE_DATASET }}
- name: Report results
run: npm run cron:report-lighthouse-results
env:
BQ_LIGHTHOUSE_DATASET: ${{ secrets.BQ_LIGHTHOUSE_DATASET }}
2 changes: 1 addition & 1 deletion src/scripts/cronjobs/reportLighthouseResults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async function run() {
console.table(transformedData);
logger.info("lighthouse_report", lighthouseReport);

const results = getLighthouseResults();
const results = await getLighthouseResults();
console.info("BigQuery dataset", results);
}

Expand Down

0 comments on commit 329c180

Please sign in to comment.