Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voltaire GovTool 1.0.14-staging #1833

Merged
merged 61 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
b10d9fb
add ci
Baja-KS Aug 20, 2024
8363dc6
only running services
Baja-KS Aug 20, 2024
acf144d
move vars to secrets
Baja-KS Aug 20, 2024
8beed61
add gh actions env
Baja-KS Aug 20, 2024
1872f44
fix typo
Baja-KS Aug 20, 2024
7eaa4b1
use qovery dockerfile for FE
Baja-KS Aug 21, 2024
b6a28a9
add condition for deployment
mpavlovicbb Aug 22, 2024
007b7f3
Merge pull request #1772 from IntersectMBO/introduce-ci
mpavlovicbb Aug 22, 2024
5236c54
feat(#1601): add support for protocol parameter change governance action
MSzalowski Aug 22, 2024
9c21780
chore: fix ts errors
MSzalowski Aug 22, 2024
b927811
chore: force frontend packages installation
MSzalowski Aug 22, 2024
d5e69f0
[#1702][#1708] Add warning banners for network name and bootstrapping…
j-dyczka Aug 22, 2024
9293da1
Merge pull request #1799 from IntersectMBO/feat/1702-1708-top-banners
jdyczka Aug 23, 2024
a709bdc
Merge pull request #1797 from IntersectMBO/feat/1601-rendering-protoc…
MSzalowski Aug 23, 2024
a76b22e
feat(#1704): show cc committee and spo total gov action votes
MSzalowski Aug 22, 2024
95ae911
chore: bump @intersect.mbo/pdf-ui to v0.3.6
MSzalowski Aug 23, 2024
d508a23
Merge pull request #1798 from IntersectMBO/feat/1704-showing-spo-and-…
MSzalowski Aug 23, 2024
25550dc
Merge pull request #1800 from IntersectMBO/chore/bump-intersect-mbo-p…
MSzalowski Aug 23, 2024
ed263e5
feat(#1600): add support for hard fork initiation governance action d…
MSzalowski Aug 23, 2024
adb011a
Merge pull request #1802 from IntersectMBO/feat/1600-rendering-hard-f…
MSzalowski Aug 23, 2024
864515b
feat(#1600): add support for previous governance action data
MSzalowski Aug 23, 2024
73fc4f8
Merge pull request #1804 from IntersectMBO/feat/1600-rendering-hard-f…
MSzalowski Aug 23, 2024
4bd7601
[#1600] display hard fork initiation governance action details
j-dyczka Aug 23, 2024
5d03b46
Merge pull request #1803 from IntersectMBO/feat/1600-hardfork-initiat…
MSzalowski Aug 23, 2024
9d57bc5
docs: fix broken link in base readme
Ryun1 Aug 14, 2024
1fee9f9
chore: add mainnet govtool domain to bug issue template
Ryun1 Aug 23, 2024
035dd13
chore: bump @intersect.mbo/pdf-ui to v0.3.7
MSzalowski Aug 23, 2024
d860efa
chore: adjust copy for cc votes
Ryun1 Aug 23, 2024
83d7430
Merge pull request #1813 from IntersectMBO/chore/bump-intersect-mbo-p…
MSzalowski Aug 24, 2024
a7c0438
feat: cip-119 support on metadata-validation service
MSzalowski Aug 23, 2024
8b88d4b
feat: cip-119 support on haskell backend
MSzalowski Aug 23, 2024
4fafb04
fix: add missing CIP-119 doNotList to metadata-validation
MSzalowski Aug 23, 2024
06ae45b
chore(#1699): remove unneeded wallet related sentry reports
MSzalowski Aug 24, 2024
4956d54
Merge pull request #1815 from IntersectMBO/chore/1699-wallet-related-…
MSzalowski Aug 26, 2024
2ad95cb
[#1801] refactor passing props to GA details, fix ts problems
j-dyczka Aug 23, 2024
b0e5708
Merge pull request #1818 from IntersectMBO/fix/1801-deep-link-shared-…
jdyczka Aug 26, 2024
1b4e2df
[#1600] hide hadfork initiation details outside details tab
j-dyczka Aug 23, 2024
4d96812
Merge pull request #1811 from IntersectMBO/feat/1758-writing-cip119-m…
MSzalowski Aug 26, 2024
048c885
chore(#1809): bump infra to use cardano-db-sync@13.3.0.0
MSzalowski Aug 23, 2024
7070f12
Merge pull request #1812 from IntersectMBO/chore/1809-chore-bump-infr…
MSzalowski Aug 26, 2024
8b51e0e
fix(#1774): fix & update gitbook links
MSzalowski Aug 24, 2024
ef32b86
fix(#1733): fix accessing drep deposit from possibly empty epoch params
MSzalowski Aug 26, 2024
f067eac
[#1760] add CIP-119 support on frontend
j-dyczka Aug 26, 2024
e48e960
Merge pull request #1820 from IntersectMBO/feat/1760-fe-cip-119-support
jdyczka Aug 26, 2024
c54968c
fix: fix backend build providing postgresql@14 in be base Dockerile
MSzalowski Aug 26, 2024
fe370fe
Merge pull request #1823 from IntersectMBO/fix/1733-typeerror-cannot-…
MSzalowski Aug 26, 2024
1fdc652
Merge pull request #1814 from IntersectMBO/fix/1774-check-all-links-f…
MSzalowski Aug 26, 2024
7784260
Merge pull request #1819 from IntersectMBO/fix/1600-hardfork-initiati…
MSzalowski Aug 26, 2024
5b37697
Merge pull request #1825 from IntersectMBO/fix/fix-backend-image-build
MSzalowski Aug 26, 2024
8b5bd2e
fix: fix storybook tests
MSzalowski Aug 26, 2024
7958259
Merge pull request #1827 from IntersectMBO/fix/fix-storybook-tests
MSzalowski Aug 26, 2024
9c552a0
feat: HF, PPC and guardrails script support for Governance Action bui…
MSzalowski Aug 26, 2024
cfd5ff2
Merge pull request #1822 from IntersectMBO/feat/hf-ppc-treasury-gov-a…
MSzalowski Aug 26, 2024
e3d415d
chore: bump GovTool to v1.0.14
MSzalowski Aug 26, 2024
131d1b3
Merge pull request #1828 from IntersectMBO/chore/bump-GovTool-to-v1.0.14
MSzalowski Aug 27, 2024
af616d6
fix: backend checks
MSzalowski Aug 27, 2024
3a6c891
Merge pull request #1832 from IntersectMBO/fix/fix-backend-checks
MSzalowski Aug 27, 2024
c8348fe
Merge pull request #1829 from IntersectMBO/develop
MSzalowski Aug 27, 2024
f72a946
fix: fix payment address validation
MSzalowski Aug 27, 2024
859dad1
Merge pull request #1834 from IntersectMBO/fix/payment-address-valida…
MSzalowski Aug 27, 2024
abcc29a
Merge pull request #1835 from IntersectMBO/develop
MSzalowski Aug 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ body:
label: Domain
description: Which GovTool instance were you connected to?
options:
- gov.tools
- preview.gov.tools
- sanchogov.tools
- dev-sanchogov.tools
- test-sanchogov.tools
- stage-sanchogov.tools
- preview.gov.tools
- Custom setup
validations:
required: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/code_check_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
registry-url: "https://registry.npmjs.org/"
node-version-file: "./govtool/frontend/.nvmrc"
scope: "@intersect.mbo"
- run: npm ci
- run: npm ci --force
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMRC_TOKEN }}

Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
registry-url: "https://registry.npmjs.org/"
node-version-file: "./govtool/frontend/.nvmrc"
scope: "@intersect.mbo"
- run: npm ci
- run: npm ci --force
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMRC_TOKEN }}

Expand All @@ -83,7 +83,7 @@ jobs:
registry-url: "https://registry.npmjs.org/"
node-version-file: "./govtool/frontend/.nvmrc"
scope: "@intersect.mbo"
- run: npm ci
- run: npm ci --force
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMRC_TOKEN }}

Expand Down
58 changes: 29 additions & 29 deletions .github/workflows/frontend_sonar_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,35 @@ jobs:
runs-on: ubuntu-latest
permissions: read-all
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Cache dependencies
uses: actions/cache@v2
with:
path: govtool/frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }}
- name: Cache dependencies
uses: actions/cache@v2
with:
path: govtool/frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }}

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: "govtool/frontend/.nvmrc"
registry-url: "https://registry.npmjs.org/"
scope: "@intersect.mbo"
- name: 🧪 Test
working-directory: govtool/frontend
env:
NODE_OPTIONS: "--max_old_space_size=6144"
NODE_AUTH_TOKEN: ${{ secrets.NPMRC_TOKEN }}
run: |
npm ci
npm run test:coverage
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: "govtool/frontend/.nvmrc"
registry-url: "https://registry.npmjs.org/"
scope: "@intersect.mbo"
- name: 🧪 Test
working-directory: govtool/frontend
env:
NODE_OPTIONS: "--max_old_space_size=6144"
NODE_AUTH_TOKEN: ${{ secrets.NPMRC_TOKEN }}
run: |
npm ci --force
npm run test:coverage

- uses: sonarsource/sonarqube-scan-action@master
if: always()
with:
projectBaseDir: govtool/frontend
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: https://sonarcloud.io
- uses: sonarsource/sonarqube-scan-action@master
if: always()
with:
projectBaseDir: govtool/frontend
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: https://sonarcloud.io
186 changes: 186 additions & 0 deletions .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
name: Check,Build,Deploy

on:
push:
branches:
- develop
- test
- staging
- main

permissions:
contents: write
pull-requests: write
packages: write

env:
ENVIRONMENT: ${{ (github.ref_name == 'main' && 'prod-govtool') || (github.ref_name == 'staging' && 'pre-prod-govtool') || (github.ref_name == 'test' && 'qa-govtool') || (github.ref_name == 'develop' && 'dev-govtool') }}

jobs:
check-build-deploy:
environment: ${{ (github.ref_name == 'main' && 'prod-govtool') || (github.ref_name == 'staging' && 'pre-prod-govtool') || (github.ref_name == 'test' && 'qa-govtool') || (github.ref_name == 'develop' && 'dev-govtool') }}
strategy:
matrix:
include:
- workdir: ./govtool/backend
name: govtool-backend
dockerfile: ./govtool/backend/Dockerfile.qovery
image: ghcr.io/${{ github.repository }}-govtool-backend
qovery_container_name: govtool-backend
- workdir: ./govtool/frontend
name: govtool-frontend
dockerfile: ./govtool/frontend/Dockerfile.qovery
image: ghcr.io/${{ github.repository }}-govtool-frontend
qovery_container_name: govtool-frontend
- workdir: ./govtool/metadata-validation
name: govtool-metadata-validation
dockerfile: ./govtool/metadata-validation/Dockerfile
image: ghcr.io/${{ github.repository }}-govtool-metadata-validation
qovery_container_name: govtool-metadata-validation

runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set TAG Environment Variable
id: set_tag
run: |
if [ "${{ github.ref_name }}" = "main" ]; then
echo "TAG=${{ github.sha }}" >> $GITHUB_ENV
else
echo "TAG=${{ github.ref_name }}-${{ github.sha }}" >> $GITHUB_ENV
fi

- name: Lint Dockerfile
id: hadolint
uses: hadolint/hadolint-action@v3.1.0
with:
failure-threshold: error
format: json
dockerfile: ${{ matrix.dockerfile }}
# output-file: hadolint_output.json

- name: Save Hadolint output
id: save_hadolint_output
if: always()
run: cd ${{ matrix.workdir }} && echo "$HADOLINT_RESULTS" | jq '.' > hadolint_output.json

- name: Print Dockerfile lint output
run: |
cd ${{ matrix.workdir }}
echo "-----HADOLINT RESULT-----"
echo "Outcome: ${{ steps.hadolint.outcome }}"
echo "-----DETAILS--------"
cat hadolint_output.json
echo "--------------------"

- name: Code lint
id: code_lint
run: |
cd ${{ matrix.workdir }}
if [ ! -f lint.sh ]; then
echo "lint skipped" | tee code_lint_output.txt
exit 0
fi
set -o pipefail
sudo chmod +x lint.sh && ./lint.sh 2>&1 | tee code_lint_output.txt


- name: Unit tests
id: unit_tests
run: |
cd ${{ matrix.workdir }}
if [ ! -f unit-test.sh ]; then
echo "unit tests skipped" | tee code_lint_output.txt
exit 0
fi
set -o pipefail
sudo chmod +x unit-test.sh && ./unit-test.sh 2>&1 | tee unit_test_output.txt

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-

- id: image_lowercase
uses: ASzc/change-string-case-action@v6
with:
string: ${{ matrix.image }}

- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: ${{ matrix.workdir }}
file: ${{ matrix.dockerfile }}
tags: ${{ steps.image_lowercase.outputs.lowercase }}:${{ env.TAG }}
load: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
build-args: |
VITE_APP_ENV=${{ secrets.VITE_APP_ENV }}
VITE_BASE_URL=${{ secrets.VITE_BASE_URL }}
VITE_METADATA_API_URL=${{ secrets.VITE_METADATA_API_URL }}
VITE_GTM_ID=${{ secrets.VITE_GTM_ID }}
VITE_NETWORK_FLAG=${{ secrets.VITE_NETWORK_FLAG }}
VITE_SENTRY_DSN=${{ secrets.VITE_SENTRY_DSN }}
NPMRC_TOKEN=${{ secrets.NPMRC_TOKEN }}
VITE_USERSNAP_SPACE_API_KEY=${{ secrets.VITE_USERSNAP_SPACE_API_KEY }}
VITE_IS_PROPOSAL_DISCUSSION_FORUM_ENABLED=${{ secrets.VITE_IS_PROPOSAL_DISCUSSION_FORUM_ENABLED }}
VITE_PDF_API_URL=${{ secrets.VITE_PDF_API_URL }}

- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Scan Docker image with Dockle
id: dockle
run: |
wget https://github.com/goodwithtech/dockle/releases/download/v0.4.14/dockle_0.4.14_Linux-64bit.tar.gz
tar zxvf dockle_0.4.14_Linux-64bit.tar.gz
sudo mv dockle /usr/local/bin

dockle --exit-level fatal --format json --output ${{ matrix.workdir }}/dockle_scan_output.json ${{ steps.image_lowercase.outputs.lowercase }}:${{ env.TAG }}
echo " dockle exited w/ $?"
cat ${{ matrix.workdir }}/dockle_scan_output.json

echo "outcome=success" >> $GITHUB_OUTPUT

- name: Push Docker image to GHCR
run: |
docker push ${{ steps.image_lowercase.outputs.lowercase }}:${{ env.TAG }}

- name: Deploy with Qovery
if: github.ref == 'refs/heads/develop'
env:
QOVERY_CLI_ACCESS_TOKEN: ${{secrets.QOVERY_CLI_ACCESS_TOKEN }}
run: |

echo "Deploying on $ENVIRONMENT"
echo "Organization - ${{ vars.ORGANIZATION }}"
echo "Project - ${{ vars.PROJECT }}"

# Download and install Qovery CLI
curl -s https://get.qovery.com | bash

qovery container list \
--organization ${{ vars.ORGANIZATION }} \
--project ${{ vars.PROJECT }} \
--environment $ENVIRONMENT

qovery container deploy \
--organization ${{ vars.ORGANIZATION }} \
--project ${{ vars.PROJECT }} \
--environment $ENVIRONMENT \
--container ${{ matrix.qovery_container_name }} \
--tag ${{ env.TAG }} \
--watch
Loading
Loading