From 46088efbe9ceaea53eca3fc6d68a40e72dd7ce15 Mon Sep 17 00:00:00 2001 From: Lawrence Babb Date: Fri, 4 Oct 2024 21:57:17 -0400 Subject: [PATCH] workflow fix - prevent premature exit if no modified files are found --- .github/workflows/node.js.yml | 6 +++--- scripts/gks-procs/variation-identity-proc.sql | 1 - .../temporal-table-procs/11-voi-and-voi-scv-group-proc.sql | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 1990724..d0dbab7 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -28,13 +28,13 @@ jobs: id: build_check run: | # Get modified files that are in the 'src/' folder and end with '.ts' - MODIFIED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '^src/.*\.ts$') + MODIFIED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '^src/.*\.ts$' || true) # Print the modified files for debugging echo "Modified files:" echo "$MODIFIED_FILES" - # Check if the modified_files.txt has any content + # Check if MODIFIED_FILES has any content if [[ -n "$MODIFIED_FILES" ]]; then echo "Build should run." echo "::set-output name=build_ran::true" @@ -82,7 +82,7 @@ jobs: id: get_changed_files run: | # Get modified files that are in the 'scripts/' folder and end with '-func.sql' or '-proc.sql' - MODIFIED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '^scripts/.*\(-func\.sql\| -proc\.sql\)$') + MODIFIED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '^scripts/.*\(-func\.sql\| -proc\.sql\)$' || true) # Output the filtered list of modified files echo "$MODIFIED_FILES" > modified_files.txt diff --git a/scripts/gks-procs/variation-identity-proc.sql b/scripts/gks-procs/variation-identity-proc.sql index 5a87c9b..757dbb9 100644 --- a/scripts/gks-procs/variation-identity-proc.sql +++ b/scripts/gks-procs/variation-identity-proc.sql @@ -85,7 +85,6 @@ BEGIN END as issue, var.content FROM var - -- 2,800,531 (4/7/2024) """, rec.schema_name, rec.schema_name, rec.schema_name, rec.schema_name, rec.schema_name); EXECUTE IMMEDIATE FORMAT(""" diff --git a/scripts/temporal-table-procs/11-voi-and-voi-scv-group-proc.sql b/scripts/temporal-table-procs/11-voi-and-voi-scv-group-proc.sql index 56509e2..d53505b 100644 --- a/scripts/temporal-table-procs/11-voi-and-voi-scv-group-proc.sql +++ b/scripts/temporal-table-procs/11-voi-and-voi-scv-group-proc.sql @@ -102,8 +102,6 @@ BEGIN END; - - -- select count(*) from `clinvar_ingest.voi_scv_group`; -- find intersection between voi and voi_scv windows for the same variant to create the voi_group records