Skip to content

feat(vault): added vault admin slack command to register user and fet… #86

feat(vault): added vault admin slack command to register user and fet…

feat(vault): added vault admin slack command to register user and fet… #86

Workflow file for this run

name: Test
on:
workflow_dispatch:
pull_request:
branches:
- "feature/**"
push:
branches:
- main
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
- name: Setup jdk 20
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "21.0.3"
cache: "gradle"
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew --no-daemon installDist --parallel
- name: Load secrets
uses: 1password/load-secrets-action@v1
with:
# Export loaded secrets as environment variables
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
# gcp
GCP_PROJECT_ID: op://env/dev/gcp/GCP_PROJECT_ID
GCP_SA_KEY: op://env/github/gcp-dev/GCP_SA_KEY
# stripe
STRIPE_API_KEY: op://env/dev/stripe/STRIPE_API_KEY
STRIPE_WEBHOOK_ENDPOINT_SECRET: op://env/dev/stripe/STRIPE_WEBHOOK_ENDPOINT_SECRET
STRIPE_PRODUCT_ID_RESEARCH_TWIC: op://env/dev/stripe/STRIPE_PRODUCT_ID_RESEARCH_TWIC
STRIPE_PRODUCT_ID_RESEARCH_NN: op://env/dev/stripe/STRIPE_PRODUCT_ID_RESEARCH_NN
STRIPE_PRODUCT_ID_RESEARCH_AOC: op://env/dev/stripe/STRIPE_PRODUCT_ID_RESEARCH_AOC
STRIPE_PRODUCT_ID_RESEARCH_PRO: op://env/dev/stripe/STRIPE_PRODUCT_ID_RESEARCH_PRO
STRIPE_COUPON_CORPORATE_PLAN: op://env/dev/stripe/STRIPE_COUPON_CORPORATE_PLAN
# for AT
STRIPE_PRICE_ID_RESEARCH_PRO: op://env/dev/stripe/STRIPE_PRICE_ID_RESEARCH_PRO
# monitoring - metrics for app
METRICS_ENABLED: false
# sendgrid for app
SENDGRID_API_KEY: op://env/github/sendgrid/SENDGRID_API_KEY
SENDGRID_ENABLED: false
# contentful for app
CONTENTFUL_INVEST_SPACE_ID: op://env/dev/contentful/CONTENTFUL_INVEST_SPACE_ID
CONTENTFUL_INVEST_SPACE_TOKEN: op://env/dev/contentful/CONTENTFUL_INVEST_SPACE_TOKEN
CONTENTFUL_LEGAL_SPACE_ID: op://env/dev/contentful/CONTENTFUL_LEGAL_SPACE_ID
CONTENTFUL_LEGAL_SPACE_TOKEN: op://env/dev/contentful/CONTENTFUL_LEGAL_SPACE_TOKEN
CONTENTFUL_RESEARCH_SPACE_ID: op://env/dev/contentful/CONTENTFUL_RESEARCH_SPACE_ID
CONTENTFUL_RESEARCH_SPACE_TOKEN: op://env/dev/contentful/CONTENTFUL_RESEARCH_SPACE_TOKEN
CONTENTFUL_RESEARCH_SPACE_CMA_TOKEN: op://env/dev/contentful/CONTENTFUL_RESEARCH_SPACE_CMA_TOKEN
# for testing
TEST_PAGE_ID: op://env/dev/test/TEST_PAGE_ID
TEST_REPORT_ID: op://env/dev/test/TEST_REPORT_ID
# algolia for app
ALGOLIA_APP_ID: op://env/dev/algolia/ALGOLIA_APP_ID
ALGOLIA_API_KEY: op://env/dev/algolia/ALGOLIA_API_KEY
# slack for app
SLACK_BOT_TOKEN: op://env/dev/slack/SLACK_BOT_TOKEN
SLACK_SIGNING_SECRET: op://env/dev/slack/SLACK_SIGNING_SECRET
# @vihang
SLACK_ALERTS_CHANNEL_ID: op://env/dev/slack/SLACK_CHANNEL_ID
SLACK_GENERAL_CHANNEL_ID: op://env/dev/slack/SLACK_CHANNEL_ID
SLACK_INVEST_CHANNEL_ID: op://env/dev/slack/SLACK_CHANNEL_ID
SLACK_PRODUCT_CHANNEL_ID: op://env/dev/slack/SLACK_CHANNEL_ID
SLACK_PROFESSIONAL_INVESTORS_CHANNEL_ID: op://env/dev/slack/SLACK_CHANNEL_ID
SLACK_RESEARCH_CHANNEL_ID: op://env/dev/slack/SLACK_CHANNEL_ID
SLACK_RESEARCH_EVENTS_CHANNEL_ID: op://env/dev/slack/SLACK_CHANNEL_ID
SLACK_VAULT_ADMIN_CHANNEL_ID: op://env/dev/slack/SLACK_VAULT_ADMIN_CHANNEL_ID
# slack unit testing
SLACK_CHANNEL_ID: op://env/dev/slack/SLACK_CHANNEL_ID
# user service
SENDGRID_TEMPLATE_ID_WELCOME_TO_K33: op://env/dev/sendgrid/SENDGRID_TEMPLATE_ID_WELCOME_TO_K33
SENDGRID_TEMPLATE_ID_WELCOME_TO_K33_RESEARCH: op://env/dev/sendgrid/SENDGRID_TEMPLATE_ID_WELCOME_TO_K33_RESEARCH
SENDGRID_UNSUBSCRIBE_GROUP_ID_K33: op://env/dev/sendgrid/SENDGRID_UNSUBSCRIBE_GROUP_ID_K33
SENDGRID_UNSUBSCRIBE_GROUP_ID_K33_RESEARCH: op://env/dev/sendgrid/SENDGRID_UNSUBSCRIBE_GROUP_ID_K33_RESEARCH
# stripe webhook
## TWIC
SENDGRID_TEMPLATE_ID_WELCOME_TO_K33_RESEARCH_TWIC: op://env/dev/sendgrid/SENDGRID_TEMPLATE_ID_WELCOME_TO_K33_RESEARCH_TWIC
SENDGRID_CONTACT_LIST_ID_K33_RESEARCH_TWIC: op://env/dev/sendgrid/SENDGRID_CONTACT_LIST_ID_K33_RESEARCH_TWIC
SENDGRID_UNSUBSCRIBE_GROUP_ID_K33_RESEARCH_TWIC: op://env/dev/sendgrid/SENDGRID_UNSUBSCRIBE_GROUP_ID_K33_RESEARCH_TWIC
## NN
SENDGRID_TEMPLATE_ID_WELCOME_TO_K33_RESEARCH_NN: op://env/dev/sendgrid/SENDGRID_TEMPLATE_ID_WELCOME_TO_K33_RESEARCH_NN
SENDGRID_CONTACT_LIST_ID_K33_RESEARCH_NN: op://env/dev/sendgrid/SENDGRID_CONTACT_LIST_ID_K33_RESEARCH_NN
SENDGRID_UNSUBSCRIBE_GROUP_ID_K33_RESEARCH_NN: op://env/dev/sendgrid/SENDGRID_UNSUBSCRIBE_GROUP_ID_K33_RESEARCH_NN
## AOC
SENDGRID_TEMPLATE_ID_WELCOME_TO_K33_RESEARCH_AOC: op://env/dev/sendgrid/SENDGRID_TEMPLATE_ID_WELCOME_TO_K33_RESEARCH_AOC
SENDGRID_CONTACT_LIST_ID_K33_RESEARCH_AOC: op://env/dev/sendgrid/SENDGRID_CONTACT_LIST_ID_K33_RESEARCH_AOC
SENDGRID_UNSUBSCRIBE_GROUP_ID_K33_RESEARCH_AOC: op://env/dev/sendgrid/SENDGRID_UNSUBSCRIBE_GROUP_ID_K33_RESEARCH_AOC
## PRO
SENDGRID_TEMPLATE_ID_WELCOME_TO_K33_RESEARCH_PRO_TRIAL: op://env/dev/sendgrid/SENDGRID_TEMPLATE_ID_WELCOME_TO_K33_RESEARCH_PRO_TRIAL
SENDGRID_TEMPLATE_ID_WELCOME_TO_K33_RESEARCH_PRO: op://env/dev/sendgrid/SENDGRID_TEMPLATE_ID_WELCOME_TO_K33_RESEARCH_PRO
SENDGRID_CONTACT_LIST_ID_K33_RESEARCH_PRO: op://env/dev/sendgrid/SENDGRID_CONTACT_LIST_ID_K33_RESEARCH_PRO
SENDGRID_UNSUBSCRIBE_GROUP_ID_K33_RESEARCH_PRO: op://env/dev/sendgrid/SENDGRID_UNSUBSCRIBE_GROUP_ID_K33_RESEARCH_PRO
# lifecycle
SENDGRID_TEMPLATE_ID_CANCEL_DURING_TRIAL_K33_RESEARCH_PRO: op://env/dev/sendgrid/SENDGRID_TEMPLATE_ID_CANCEL_DURING_TRIAL_K33_RESEARCH_PRO
# stripe cronjob
SENDGRID_TEMPLATE_ID_NEW_USER_OFFER_K33_RESEARCH: op://env/dev/sendgrid/SENDGRID_TEMPLATE_ID_NEW_USER_OFFER_K33_RESEARCH
# analytics
GOOGLE_ANALYTICS_API_SECRET: op://env/dev/analytics/GOOGLE_ANALYTICS_API_SECRET
GOOGLE_ANALYTICS_FIREBASE_APP_ID: op://env/dev/analytics/GOOGLE_ANALYTICS_FIREBASE_APP_ID
GOOGLE_ANALYTICS_MEASUREMENT_ID: op://env/dev/analytics/GOOGLE_ANALYTICS_MEASUREMENT_ID
# for invest app
# List of ISO Alpha3 3-char uppercase Country codes separated by comma without space.
# E.g. ABC,PQR,XYZ
INVEST_DENIED_COUNTRY_CODE_LIST: op://env/dev/invest/INVEST_DENIED_COUNTRY_CODE_LIST
# Single value of the format - address#label
INVEST_EMAIL_FROM: op://env/dev/invest/INVEST_EMAIL_FROM
# Comma separated non-empty list, with each value of the format - address#label
INVEST_EMAIL_TO_LIST: op://env/dev/invest/INVEST_EMAIL_TO_LIST
# Comma separated nullable or empty (blank) list, with each value of the format - address#label
# INVEST_EMAIL_CC_LIST:
# Comma separated nullable or empty (blank) list, with each value of the format - address#label
# INVEST_EMAIL_BCC_LIST:
# for vault app
## fireblocks
FIREBLOCKS_API_KEY: op://env/dev/vault/FIREBLOCKS_API_KEY
FIREBLOCKS_SECRET_KEY: op://env/dev/vault/FIREBLOCKS_SECRET_KEY
## coin_gecko
COIN_GECKO_API_KEY: op://env/dev/vault/COIN_GECKO_API_KEY
## stripe
VAULT_STRIPE_API_KEY: op://env/dev/vault/STRIPE_API_KEY
# for gcp emulators
GOOGLE_CLOUD_PROJECT: op://env/dev/gcp/GCP_PROJECT_ID
GOOGLE_APPLICATION_CREDENTIALS: infra/gcp/secrets/gcp-service-account.json
# for trade app
# SPANNER_EMULATOR_HOST: 0.0.0.0:9010
- name: Create GCP service account key file
run: |
echo "${GCP_SA_KEY}" >> infra/gcp/secrets/gcp-service-account.json
- name: Run docker compose based system integration tests
run: docker compose up --build --abort-on-container-exit