replaced underscores with dashes in sql filenames #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node.js CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20] # Specify Node.js 20 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm install | |
- name: Compile TypeScript | |
run: npx tsc | |
- name: Run tests | |
run: npm test | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
strategy: | |
matrix: | |
node-version: [20] # Specify Node.js 20 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm install | |
- name: Compile TypeScript | |
run: npx tsc | |
- name: Authenticate to Google Cloud for clingen-swc | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.GCP_SA_KEY }} | |
- name: Setup Google Cloud SDK | |
uses: google-github-actions/setup-gcloud@v1 | |
with: | |
version: 'latest' | |
- name: Copy javascript functions that are referenced by scripts to Google Cloud Storage | |
run: | | |
gsutil cp -r ./dist/* gs://clinvar-ingest/bq-tools | |
- name: Execute BigQuery Script for clingen-stage | |
env: | |
PROJECT_ID: 'clingen-stage' | |
run: | | |
echo "Executing BigQuery scripts for clingen-stage...(only sql files ending in -func.sql)" | |
for file in $(find ./scripts -type f -name '*-func.sql'); do | |
echo "Executing $file..." | |
bq query --use_legacy_sql=false --project_id=$PROJECT_ID < "$file" | |
done | |
- name: Execute BigQuery Script for clingen-dev | |
env: | |
PROJECT_ID: 'clingen-dev' | |
run: | | |
echo "Executing BigQuery scripts for clingen-dev...(all files ending in -func.sql or -proc.sql)" | |
for file in $(find ./scripts -type f \( -name '*-func.sql' -o -name '*-proc.sql' \)); do | |
echo "Executing $file..." | |
bq query --use_legacy_sql=false --project_id=$PROJECT_ID < "$file" | |
done | |