Skip to content

bug: Dataset Loading Performance (#112) #52

bug: Dataset Loading Performance (#112)

bug: Dataset Loading Performance (#112) #52

Workflow file for this run

name: gateway
on:
workflow_dispatch:
push:
paths:
- 'packages/gateway/**'
branches:
- main
tags:
- "v*.*.*"
pull_request:
paths:
- 'packages/gateway/**'
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
name: Check for Linting Errors
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
- name: NPM Install
run: npm install --only=dev
shell: bash
- name: Check for Linting Issues
run: npm run prettier --workspace=packages/gateway
build:
runs-on: ubuntu-latest
name: Build Code
defaults:
run:
working-directory: packages/gateway
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
- name: NPM Install
run: npm install
shell: bash
- name: Build
run: npm run build
# Handles pushing changes to the staging deployment
# Runs if linting, building passes and its a push to main/tag
staging-deploy:
runs-on: ubuntu-latest
name: Deploy to Staging
needs: [lint, build]
permissions:
contents: 'read'
id-token: 'write'
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
defaults:
run:
working-directory: packages/gateway
steps:
- name: Checkout Repository
uses: actions/checkout@v3
# App Engine deploy logic does not play well with
- name: Cleanup
run: rm package-lock.json
- name: GCP Auth
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GCP_STAGING_PROJECT_ID }}
workload_identity_provider: ${{ secrets.GCP_STAGING_ID_PROVIDER }}
service_account: ${{ secrets.STAGING_GCP_SERVICE_ACCOUNT }}
- name: Deploy to Staging
uses: 'google-github-actions/deploy-appengine@v2'
with:
working_directory: 'packages/gateway'
env_vars: |-
SIGNLAB_URI=${{ secrets.STAGING_SIGNLAB_URI }}
LEX_URI=${{ secrets.STAGING_LEX_URI }}
AUTH_URI=${{ secrets.STAGING_AUTH_URI }}
eu-prod-deploy:
runs-on: ubuntu-latest
name: Deploy to EU Prod
needs: [lint, build]
permissions:
contents: 'read'
id-token: 'write'
if: startsWith(github.ref, 'refs/tags/v')
defaults:
run:
working-directory: packages/gateway
steps:
- name: Checkout Repository
uses: actions/checkout@v3
# App Engine deploy logic does not play well with
- name: Cleanup
run: rm package-lock.json
- name: GCP Auth
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GCP_PROD_EU_PROJECT_ID }}
workload_identity_provider: ${{ secrets.GCP_PROD_EU_ID_PROVIDER }}
service_account: ${{ secrets.PROD_EU_GCP_SERVICE_ACCOUNT }}
- name: Deploy to Staging
uses: 'google-github-actions/deploy-appengine@v2'
with:
working_directory: 'packages/gateway'
env_vars: |-
SIGNLAB_URI=${{ secrets.PROD_EU_SIGNLAB_URI }}
LEX_URI=${{ secrets.PROD_EU_LEX_URI }}
AUTH_URI=${{ secrets.PROD_EU_AUTH_URI }}
us-prod-deploy:
runs-on: ubuntu-latest
name: Deploy to US Prod
needs: [lint, build]
permissions:
contents: 'read'
id-token: 'write'
if: startsWith(github.ref, 'refs/tags/v')
defaults:
run:
working-directory: packages/gateway
steps:
- name: Checkout Repository
uses: actions/checkout@v3
# App Engine deploy logic does not play well with
- name: Cleanup
run: rm package-lock.json
- name: GCP Auth
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GCP_PROD_US_PROJECT_ID }}
workload_identity_provider: ${{ secrets.GCP_PROD_US_ID_PROVIDER }}
service_account: ${{ secrets.PROD_US_GCP_SERVICE_ACCOUNT }}
- name: Deploy to Staging
uses: 'google-github-actions/deploy-appengine@v2'
with:
working_directory: 'packages/gateway'
env_vars: |-
SIGNLAB_URI=${{ secrets.PROD_US_SIGNLAB_URI }}
LEX_URI=${{ secrets.PROD_US_LEX_URI }}
AUTH_URI=${{ secrets.PROD_US_AUTH_URI }}