From 82e3be76cf363af7b5715b3fbb4972a83682643a Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 23 Feb 2024 11:23:28 -0800 Subject: [PATCH] benchmarks.yml: skip benchmarking if the DATABASE_URL is not set (#2701) * benchmarks.yml: skip benchmarking if the DATABASE_URL is not set * try to expand the value * workaround secrets not available in the `if:` condition * only skip database / pytest step if missing creds --- .github/workflows/benchmarks.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 1a1ca645fd8..7c61f0f1810 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -24,6 +24,8 @@ env: jobs: reflex-web: + env: + DATABASE_URL: ${{ secrets.DATABASE_URL }} strategy: fail-fast: false matrix: @@ -66,9 +68,10 @@ jobs: env: LHCI_GITHUB_APP_TOKEN: $ - name: Run Benchmarks + # Only run if the database creds are available in this context. + if: ${{ env.DATABASE_URL }} working-directory: ./integration/benchmarks run: poetry run python benchmarks.py "$GITHUB_SHA" .lighthouseci env: GITHUB_SHA: ${{ github.sha }} - DATABASE_URL: ${{ secrets.DATABASE_URL }} PR_TITLE: ${{ github.event.pull_request.title }}