-
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 #1081 from IntersectMBO/develop
Cardano Stack: Node Version Upgrade, Various Enhancements, Fixes, Test Updates
- Loading branch information
Showing
125 changed files
with
4,473 additions
and
1,488 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Build and deploy GovTool test stack | ||
run-name: Deploy by @${{ github.actor }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- test | ||
|
||
env: | ||
ENVIRONMENT: "test" | ||
CARDANO_NETWORK: "sanchonet" | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy app | ||
runs-on: ubuntu-latest | ||
env: | ||
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }} | ||
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }} | ||
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }} | ||
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} | ||
GTM_ID: ${{ secrets.GTM_ID }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} | ||
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup SSH agent | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.TEST_STACK_SSH_KEY }} | ||
|
||
- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,32 @@ | ||
name: Lighthouse | ||
|
||
on: | ||
push: | ||
paths: | ||
- govtool/frontend/** | ||
- .github/workflows/lighthouse.yml | ||
workflow_run: | ||
workflows: | ||
- Build and deploy GovTool test stack | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
|
||
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 +35,6 @@ 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=${LHCI_SERVER_URL} --ignoreDuplicateBuildFailure | ||
env: | ||
LHCI_SERVER_URL: https://lighthouse-govtool.cardanoapi.io |
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 was deleted.
Oops, something went wrong.
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
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,6 +1,2 @@ | ||
KUBER_API_URL=https://sanchonet.kuber.cardanoapi.io | ||
KUBER_API_KEY=xxxxxxxxxxxxx | ||
|
||
## Not required anymore | ||
BLOCKFROST_API_URL= | ||
BLOCKFROST_PROJECT_ID= |
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.