From 471a90c196e3c5987505a53493de24d1540e043a Mon Sep 17 00:00:00 2001 From: Lawrence Babb Date: Tue, 1 Oct 2024 09:32:14 -0400 Subject: [PATCH] still chasing solution --- .github/workflows/node.js.yml | 10 +++++++--- scripts/general/all_schemas-func.sql | 2 +- src/bq-utils.ts | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0d7ef0c..7ba59cc 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -27,7 +27,9 @@ jobs: - name: Check if TypeScript files were modified id: build_check run: | - MODIFIED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }}) + git fetch origin main --depth=2 + PREVIOUS_COMMIT=$(git rev-parse HEAD~1) + MODIFIED_FILES=$(git diff --name-only $PREVIOUS_COMMIT HEAD) if [[ "$MODIFIED_FILES" == *"src/**/*.ts"* ]]; then echo "Build should run." echo "::set-output name=build_ran::true" @@ -90,10 +92,12 @@ jobs: version: 'latest' - name: Get modified files - id: get_changed_files run: | - MODIFIED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }}) + git fetch origin main --depth=2 + PREVIOUS_COMMIT=$(git rev-parse HEAD~1) + MODIFIED_FILES=$(git diff --name-only $PREVIOUS_COMMIT HEAD) echo "$MODIFIED_FILES" > modified_files.txt + echo "$MODIFIED_FILES" - name: Execute clingen-stage BigQuery Function Scripts run: | diff --git a/scripts/general/all_schemas-func.sql b/scripts/general/all_schemas-func.sql index f1779fa..83d6794 100644 --- a/scripts/general/all_schemas-func.sql +++ b/scripts/general/all_schemas-func.sql @@ -20,7 +20,7 @@ AS ( WHERE ( REGEXP_CONTAINS(iss.schema_name, r'^clinvar_\d{4}_\d{2}_\d{2}_v\d+_\d+_\d+$') - OR + OR REGEXP_CONTAINS(iss.schema_name, r'^clinvar_\d{4}_\d{2}_\d{2}_v\d+_\d+_\d+_beta\d+$') ) AND diff --git a/src/bq-utils.ts b/src/bq-utils.ts index ec584d6..31d93e5 100644 --- a/src/bq-utils.ts +++ b/src/bq-utils.ts @@ -255,4 +255,4 @@ function createSigType(nosig_count: number, unc_count: number, sig_count: number { count: unc_count, percent: Math.round((unc_count / total) * 1000) / 1000 }, { count: sig_count, percent: Math.round((sig_count / total) * 1000) / 1000 } ]; -} +} \ No newline at end of file