From 72d51cfcc34ce17f9aa0ab528d6a90aa563610f8 Mon Sep 17 00:00:00 2001 From: DistributedDoge <49067954+DistributedDoge@users.noreply.github.com> Date: Mon, 15 Jan 2024 17:27:15 +0100 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=91=B7=20add=20step=20times=20to=20?= =?UTF-8?q?CI=20summary=20(#46)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: David Gasquez --- .github/workflows/ci.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc54d22..f7c1fac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,10 +26,24 @@ jobs: - name: Run run: | - make run + set -o pipefail + make run 2>&1 | tee dagster.log env: COVALENT_API_KEY: ${{ secrets.COVALENT_API_KEY }} + - name: Extract Step Execution time from logs + run: | + echo "Dagster step timings:" >> $GITHUB_STEP_SUMMARY + echo "Step Name | Execution Time" >> $GITHUB_STEP_SUMMARY + echo "-----------|----------------" >> $GITHUB_STEP_SUMMARY + while IFS= read -r line; do + if [[ $line == *"STEP_SUCCESS"* ]]; then + step_name=$(echo "$line" | awk -F' - ' '{print $7}') + exec_time=$(echo "$line" | awk -F' - ' '{split($9,a," "); print a[7]}') + echo "$step_name | $exec_time" >> $GITHUB_STEP_SUMMARY + fi + done < dagster.log + - name: Export Database and Log File Sizes run: | make tables @@ -40,8 +54,10 @@ jobs: ls -lh data/tables | tail -n +2 | awk '{printf "| %s | %s |\n", $9, $5}' } >> $GITHUB_STEP_SUMMARY ls -lh data/tables + - name: Install Quarto uses: quarto-dev/quarto-actions/setup@v2 + - name: Render run: | make render