fixed func name #65
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 clingen-stage BigQuery Function Scripts | |
run: | | |
echo "Executing BigQuery function scripts for clingen-stage in alphabetical order..." | |
for file in $(find ./scripts -type f -name '*-func.sql' | sort); do | |
echo "Executing $file..." | |
bq query --use_legacy_sql=false --project_id=$PROJECT_ID < "$file" | |
done | |
env: | |
PROJECT_ID: 'clingen-stage' | |
- name: Execute clingen-dev BigQuery Function Scripts | |
run: | | |
echo "Executing BigQuery function scripts for clingen-stage in alphabetical order..." | |
for file in $(find ./scripts -type f -name '*-func.sql' | sort); do | |
echo "Executing $file..." | |
bq query --use_legacy_sql=false --project_id=$PROJECT_ID < "$file" | |
done | |
env: | |
PROJECT_ID: 'clingen-dev' | |
- name: Execute clingen-dev BigQuery Procedure Scripts | |
run: | | |
echo "Executing BigQuery procedure scripts for clingen-stage in alphabetical order..." | |
for file in $(find ./scripts -type f -name '*-proc.sql' | sort); do | |
echo "Executing $file..." | |
bq query --use_legacy_sql=false --project_id=$PROJECT_ID < "$file" | |
done | |
env: | |
PROJECT_ID: 'clingen-dev' |