-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1040 from IntersectMBO/test
Enhance Analytics Dashboard, Metadata Service, and DRep Features; Multiple Fixes and Additions
- Loading branch information
Showing
285 changed files
with
30,435 additions
and
1,445 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,19 +19,23 @@ jobs: | |
working-directory: ./scripts/govtool | ||
env: | ||
DBSYNC_POSTGRES_DB: "cexplorer" | ||
DBSYNC_POSTGRES_USER: "postgres" | ||
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb" | ||
DBSYNC_POSTGRES_USER: "postgres" | ||
GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }} | ||
GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }} | ||
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }} | ||
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }} | ||
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }} | ||
NGINX_BASIC_AUTH: ${{ secrets.NGINX_BASIC_AUTH }} | ||
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} | ||
TRAEFIK_LE_EMAIL: "[email protected]" | ||
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }} | ||
GTM_ID: ${{ secrets.GTM_ID }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} | ||
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }} | ||
NEXT_PUBLIC_API_URL: "https://participation.sanchogov.tools" | ||
NEXT_PUBLIC_GA4_PROPERTY_ID: ${{ secrets.NEXT_PUBLIC_GA4_PROPERTY_ID }} | ||
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} | ||
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} | ||
SENTRY_IGNORE_API_RESOLUTION_ERROR: "1" | ||
TRAEFIK_LE_EMAIL: "[email protected]" | ||
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }} | ||
steps: | ||
- name: Checkout code | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,19 +18,24 @@ jobs: | |
working-directory: ./scripts/govtool | ||
env: | ||
DBSYNC_POSTGRES_DB: "cexplorer" | ||
DBSYNC_POSTGRES_USER: "postgres" | ||
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb" | ||
DBSYNC_POSTGRES_USER: "postgres" | ||
GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }} | ||
GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }} | ||
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }} | ||
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }} | ||
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }} | ||
NGINX_BASIC_AUTH: ${{ secrets.NGINX_BASIC_AUTH }} | ||
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} | ||
TRAEFIK_LE_EMAIL: "[email protected]" | ||
GTM_ID: ${{ secrets.GTM_ID }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} | ||
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }} | ||
NEXT_PUBLIC_API_URL: "https://participation.sanchogov.tools" | ||
NEXT_PUBLIC_GA4_PROPERTY_ID: ${{ secrets.NEXT_PUBLIC_GA4_PROPERTY_ID }} | ||
DEV_NGINX_BASIC_AUTH: ${{ secrets.DEV_NGINX_BASIC_AUTH }} | ||
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} | ||
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} | ||
SENTRY_IGNORE_API_RESOLUTION_ERROR: "1" | ||
TRAEFIK_LE_EMAIL: "[email protected]" | ||
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }} | ||
steps: | ||
- name: Checkout code | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,19 +20,24 @@ jobs: | |
working-directory: ./scripts/govtool | ||
env: | ||
DBSYNC_POSTGRES_DB: "cexplorer" | ||
DBSYNC_POSTGRES_USER: "postgres" | ||
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb" | ||
DBSYNC_POSTGRES_USER: "postgres" | ||
GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }} | ||
GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }} | ||
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }} | ||
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }} | ||
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }} | ||
NGINX_BASIC_AUTH: ${{ secrets.NGINX_BASIC_AUTH }} | ||
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} | ||
TRAEFIK_LE_EMAIL: "[email protected]" | ||
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }} | ||
GTM_ID: ${{ secrets.GTM_ID }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} | ||
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }} | ||
NEXT_PUBLIC_API_URL: "https://participation.sanchogov.tools" | ||
NEXT_PUBLIC_GA4_PROPERTY_ID: ${{ secrets.NEXT_PUBLIC_GA4_PROPERTY_ID }} | ||
STAGING_NGINX_BASIC_AUTH: ${{ secrets.STAGING_NGINX_BASIC_AUTH }} | ||
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} | ||
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} | ||
SENTRY_IGNORE_API_RESOLUTION_ERROR: "1" | ||
TRAEFIK_LE_EMAIL: "[email protected]" | ||
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }} | ||
steps: | ||
- name: Checkout code | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,59 +9,53 @@ on: | |
env: | ||
ENVIRONMENT: "test" | ||
CARDANO_NETWORK: "sanchonet" | ||
DOMAIN: "test-sanchonet.govtool.byron.network" | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy app | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./scripts/govtool | ||
env: | ||
DBSYNC_POSTGRES_DB: "cexplorer" | ||
DBSYNC_POSTGRES_USER: "postgres" | ||
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb" | ||
DBSYNC_POSTGRES_USER: "postgres" | ||
GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }} | ||
GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }} | ||
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }} | ||
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }} | ||
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }} | ||
NGINX_BASIC_AUTH: ${{ secrets.NGINX_BASIC_AUTH }} | ||
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} | ||
TRAEFIK_LE_EMAIL: "[email protected]" | ||
GTM_ID: ${{ secrets.GTM_ID }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} | ||
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }} | ||
NEXT_PUBLIC_API_URL: "https://participation.sanchogov.tools" | ||
NEXT_PUBLIC_GA4_PROPERTY_ID: ${{ secrets.NEXT_PUBLIC_GA4_PROPERTY_ID }} | ||
TEST_NGINX_BASIC_AUTH: ${{ secrets.TEST_NGINX_BASIC_AUTH }} | ||
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} | ||
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} | ||
SENTRY_IGNORE_API_RESOLUTION_ERROR: "1" | ||
TRAEFIK_LE_EMAIL: "[email protected]" | ||
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
aws-access-key-id: ${{ secrets.GHA_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.GHA_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: eu-west-1 | ||
|
||
- name: Login to AWS ECR | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
aws-region: eu-west-1 | ||
|
||
- name: Setup SSH agent | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.GHA_SSH_PRIVATE_KEY }} | ||
ssh-private-key: ${{ secrets.TEST_STACK_SSH_KEY }} | ||
|
||
- name: Deploy app | ||
run: | | ||
make --debug=b all | ||
- name: Reprovision Grafana | ||
run: | | ||
sleep 30 # give grafana time to start up | ||
make --debug=b reload-grafana | ||
- name: Run Ansible playbook | ||
uses: dawidd6/action-ansible-playbook@v2 | ||
with: | ||
playbook: playbook.yml | ||
directory: ./tests/test-infrastructure | ||
key: ${{ secrets.TEST_STACK_SSH_KEY }} | ||
inventory: | | ||
[test_server] | ||
${{ secrets.TEST_STACK_SERVER_IP }} ansible_user=ec2-user | ||
options: | | ||
--verbose | ||
env: | ||
GOVTOOL_TAG: ${{ github.sha }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,31 @@ | ||
name: Lighthouse | ||
|
||
on: | ||
push: | ||
paths: | ||
- govtool/frontend/** | ||
- .github/workflows/lighthouse.yml | ||
workflow_run: | ||
workflows: | ||
- Build and deploy GovTool to TEST server | ||
types: | ||
- completed | ||
|
||
jobs: | ||
lighthouse: | ||
runs-on: ubuntu-latest | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=4096 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
working-directory: ./govtool/frontend | ||
|
||
- name: Cache npm dependencies | ||
id: npm-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.npm | ||
key: ${{ runner.os }}-npm-${{ hashFiles('govtool/frontend/package-lock.json', 'tests/govtool-frontend/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
- run: npm install -g @lhci/[email protected] | ||
|
||
- name: Run build and lighthouse task | ||
- name: Run lighthouse task | ||
working-directory: ./govtool/frontend | ||
run: | | ||
npm install | ||
VITE_BASE_URL=https://staging.govtool.byron.network/ npm run build | ||
lhci collect | ||
- name: Evaluate reports | ||
if: github.repository_owner != 'IntersectMBO' | ||
working-directory: ./govtool/frontend | ||
run: | | ||
lhci assert --preset "lighthouse:recommended" | ||
|
@@ -50,9 +34,4 @@ jobs: | |
if: github.repository_owner == 'IntersectMBO' | ||
run: | | ||
lhci assert --preset lighthouse:recommended || echo "LightHouse Assertion error ignored ..." | ||
lhci upload --githubAppToken="${{ secrets.LHCI_GITHUB_APP_TOKEN }}" --token="${{ secrets.LHCI_SERVER_TOKEN }}" --serverBaseUrl=https://lighthouse.cardanoapi.io --ignoreDuplicateBuildFailure | ||
curl -X POST https://ligththouse.cardanoapi.io/api/metrics/build-reports \ | ||
-d "@./lighthouseci/$(ls ./.lighthouseci |grep 'lhr.*\.json' | head -n 1)" \ | ||
-H "commit-hash: $(git rev-parse HEAD)" \ | ||
-H "secret-token: ${{ secrets.METRICS_SERVER_SECRET_TOKEN }}" \ | ||
-H 'Content-Type: application/json' || echo "Metric Upload error ignored ..." | ||
lhci upload --githubAppToken="${{ secrets.LHCI_GITHUB_APP_TOKEN }}" --token="${{ secrets.LHCI_SERVER_TOKEN }}" --serverBaseUrl=https://lighthouse-govtool.cardanoapi.io --ignoreDuplicateBuildFailure |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,3 +139,6 @@ scripts/govtool/dev-postgres_password | |
# nodejs/yarn | ||
|
||
node_modules | ||
|
||
# sonar scanner | ||
.scannerwork/ |
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
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
Oops, something went wrong.