forked from arcanetechnology/arcane-platform
-
Notifications
You must be signed in to change notification settings - Fork 1
139 lines (139 loc) · 8.17 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
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