diff --git a/.github/workflows/lighthouse_cron.yml b/.github/workflows/lighthouse_cron.yml index 7bdb4ea87d2..45b52a41e30 100644 --- a/.github/workflows/lighthouse_cron.yml +++ b/.github/workflows/lighthouse_cron.yml @@ -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 @@ -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 }} diff --git a/src/scripts/cronjobs/reportLighthouseResults.ts b/src/scripts/cronjobs/reportLighthouseResults.ts index e5a5be2b243..54315bfb4fc 100644 --- a/src/scripts/cronjobs/reportLighthouseResults.ts +++ b/src/scripts/cronjobs/reportLighthouseResults.ts @@ -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); }