Skip to content

Commit a904162

Browse files
authored
Merge pull request #3052 from IntersectMBO/staging
GovTool - v2.0.12
2 parents eeb24f6 + fee17f6 commit a904162

File tree

112 files changed

+2346
-3704
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+2346
-3704
lines changed

.github/workflows/code_check_frontend.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/checkout@v4
1919

2020
- name: Cache dependencies
21-
uses: actions/cache@v2
21+
uses: actions/cache@v4
2222
with:
2323
path: govtool/frontend/node_modules
2424
key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }}
@@ -44,7 +44,7 @@ jobs:
4444
uses: actions/checkout@v4
4545

4646
- name: Cache dependencies
47-
uses: actions/cache@v2
47+
uses: actions/cache@v4
4848
with:
4949
path: govtool/frontend/node_modules
5050
key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }}
@@ -70,7 +70,7 @@ jobs:
7070
uses: actions/checkout@v4
7171

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

.github/workflows/frontend_sonar_scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
1818

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

.github/workflows/merge.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
uses: docker/setup-buildx-action@v2
103103

104104
- name: Cache Docker layers
105-
uses: actions/cache@v3
105+
uses: actions/cache@v4
106106
with:
107107
path: /tmp/.buildx-cache
108108
key: ${{ runner.os }}-buildx-${{ github.sha }}

.github/workflows/pr.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ jobs:
7474
set -o pipefail
7575
sudo chmod +x lint.sh && ./lint.sh 2>&1 | tee code_lint_output.txt
7676
77-
7877
- name: Unit tests
7978
id: unit_tests
8079
run: |
@@ -90,7 +89,7 @@ jobs:
9089
uses: docker/setup-buildx-action@v2
9190

9291
- name: Cache Docker layers
93-
uses: actions/cache@v3
92+
uses: actions/cache@v4
9493
with:
9594
path: /tmp/.buildx-cache
9695
key: ${{ runner.os }}-buildx-${{ github.sha }}
@@ -127,19 +126,19 @@ jobs:
127126
VITE_IPFS_PROJECT_ID=${{ secrets.IPFS_PROJECT_ID }}
128127
IPFS_GATEWAY=${{ secrets.IPFS_GATEWAY }}
129128
IPFS_PROJECT_ID=${{ secrets.IPFS_PROJECT_ID }}
130-
129+
131130
- name: Scan Docker image with Dockle
132131
id: dockle
133132
run: |
134-
wget -q https://github.com/goodwithtech/dockle/releases/download/v0.4.14/dockle_0.4.14_Linux-64bit.tar.gz
135-
tar zxf dockle_0.4.14_Linux-64bit.tar.gz
136-
sudo mv dockle /usr/local/bin
133+
wget -q https://github.com/goodwithtech/dockle/releases/download/v0.4.14/dockle_0.4.14_Linux-64bit.tar.gz
134+
tar zxf dockle_0.4.14_Linux-64bit.tar.gz
135+
sudo mv dockle /usr/local/bin
137136
138-
dockle --exit-code 1 --exit-level fatal -ak GHC_RELEASE_KEY -ak CABAL_INSTALL_RELEASE_KEY -ak STACK_RELEASE_KEY -ak KEY_SHA512 --format json --input '/tmp/image-${{ matrix.name }}-${{ github.sha }}-pr.tar' --output ${{ matrix.workdir }}/dockle_scan_output.json
139-
rm -rf '/tmp/image-${{ matrix.name }}-${{ github.sha }}-pr.tar'
140-
cat ${{ matrix.workdir }}/dockle_scan_output.json
137+
dockle --exit-code 1 --exit-level fatal -ak GHC_RELEASE_KEY -ak CABAL_INSTALL_RELEASE_KEY -ak STACK_RELEASE_KEY -ak KEY_SHA512 --format json --input '/tmp/image-${{ matrix.name }}-${{ github.sha }}-pr.tar' --output ${{ matrix.workdir }}/dockle_scan_output.json
138+
rm -rf '/tmp/image-${{ matrix.name }}-${{ github.sha }}-pr.tar'
139+
cat ${{ matrix.workdir }}/dockle_scan_output.json
141140
142-
echo "outcome=success" >> $GITHUB_OUTPUT
141+
echo "outcome=success" >> $GITHUB_OUTPUT
143142
144143
- name: Create PR comment
145144
if: always()

.github/workflows/test_integration_playwright.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ on:
3131
workflow_run:
3232
workflows: ["Build and deploy GovTool test stack"]
3333
types: [completed]
34-
34+
3535
concurrency:
3636
group: ${{ github.workflow }}-${{ github.ref }}
3737
cancel-in-progress: false
3838

3939
jobs:
4040
integration-tests:
4141
runs-on: ubuntu-latest
42-
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
42+
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
4343
outputs:
4444
start_time: ${{ steps.set-pending-status.outputs.timestamp }}
4545
status: ${{ steps.run-test.outcome }}
@@ -49,7 +49,7 @@ jobs:
4949
steps:
5050
- uses: actions/checkout@v4
5151
with:
52-
ref: ${{ env.COMMIT_SHA }}
52+
ref: ${{ env.COMMIT_SHA }}
5353
- name: Set pending commit status
5454
id: set-pending-status
5555
run: |
@@ -70,7 +70,7 @@ jobs:
7070

7171
- name: Cache Playwright browsers
7272
id: cache-playwright-browsers
73-
uses: actions/cache@v3
73+
uses: actions/cache@v4
7474
with:
7575
path: |
7676
~/.cache/ms-playwright
@@ -132,7 +132,7 @@ jobs:
132132

133133
publish-report:
134134
runs-on: ubuntu-latest
135-
if: always() && needs.integration-tests.result != 'skipped'
135+
if: always() && needs.integration-tests.result != 'skipped'
136136
needs: integration-tests
137137
outputs:
138138
report_number: ${{ steps.report-details.outputs.report_number }}
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Update GovTool Version and Changelog
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "New version (e.g., 1.0.0)"
8+
required: true
9+
10+
jobs:
11+
update-version:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
registry-url: "https://registry.npmjs.org/"
24+
node-version-file: "./govtool/frontend/.nvmrc"
25+
scope: "@intersect.mbo"
26+
27+
- name: Set Version Variable
28+
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
29+
30+
- name: Update package.json files and install dependencies
31+
run: |
32+
jq --arg v "$VERSION" '.version = $v' govtool/frontend/package.json > temp.json && mv temp.json govtool/frontend/package.json
33+
jq --arg v "$VERSION" '.version = $v' govtool/metadata-validation/package.json > temp.json && mv temp.json govtool/metadata-validation/package.json
34+
35+
echo "Running npm install to update lock files..."
36+
cd govtool/frontend && npm install && cd ../..
37+
cd govtool/metadata-validation && npm install && cd ../..
38+
39+
- name: Update vva-be.cabal version (Preserve Spacing)
40+
run: |
41+
sed -i -E "s/^(version:[[:space:]]+)[0-9]+\.[0-9]+\.[0-9]+/\1$VERSION/" govtool/backend/vva-be.cabal
42+
echo "✅ Updated version in vva-be.cabal while preserving spacing."
43+
44+
- name: Update Dockerfile Versions
45+
run: |
46+
sed -i -E "s/vva-be-[0-9]+\.[0-9]+\.[0-9]+/vva-be-$VERSION/g" govtool/backend/Dockerfile
47+
sed -i -E "s/vva-be-[0-9]+\.[0-9]+\.[0-9]+/vva-be-$VERSION/g" govtool/backend/Dockerfile.qovery
48+
echo "✅ Updated vva-be version in Dockerfiles."
49+
50+
- name: Update Metadata Validation API Version
51+
run: |
52+
sed -i -E "s/(\.setVersion\()[\"'][0-9]+\.[0-9]+\.[0-9]+[\"']/\1\"$VERSION\"/" govtool/metadata-validation/src/main.ts
53+
echo "✅ Updated API version in main.ts"
54+
55+
- name: Update CHANGELOG.md
56+
run: |
57+
#!/bin/bash
58+
VERSION="${{ github.event.inputs.version }}"
59+
TODAY=$(date +%Y-%m-%d)
60+
RELEASE_TAG="v$VERSION"
61+
RELEASE_LINK="[v$VERSION](https://github.com/IntersectMBO/govtool/releases/tag/$RELEASE_TAG)"
62+
TEMP_FILE=$(mktemp)
63+
64+
echo "Updating CHANGELOG.md with version $VERSION and date $TODAY..."
65+
66+
awk -v rl="$RELEASE_LINK" -v td="$TODAY" '
67+
BEGIN { unreleased_found = 0; print_new_unreleased = 1 }
68+
{
69+
if ($1 == "##" && $2 == "[Unreleased]") {
70+
unreleased_found = 1
71+
72+
# Print the new Unreleased section with required sub-sections
73+
print "## [Unreleased]\n"
74+
print "### Added\n"
75+
print "### Fixed\n"
76+
print "### Changed\n"
77+
print "### Removed\n"
78+
79+
# Rename the old Unreleased section with a version and date
80+
print "## " rl " " td "\n"
81+
next
82+
}
83+
print
84+
}' CHANGELOG.md > "$TEMP_FILE"
85+
86+
mv "$TEMP_FILE" CHANGELOG.md
87+
88+
echo "✅ CHANGELOG.md updated successfully!"
89+
90+
- name: Create Pull Request
91+
uses: peter-evans/create-pull-request@v7
92+
with:
93+
token: ${{ secrets.GITHUB_TOKEN }}
94+
branch: "chore/update-govtool-to-v${{ github.event.inputs.version }}"
95+
title: "Update GovTool to v${{ github.event.inputs.version }}"
96+
commit-message: "chore: update GovTool to v${{ github.event.inputs.version }}"
97+
body: |
98+
This PR updates GovTool to version `${{ github.event.inputs.version }}`.
99+
100+
101+
Workflow executed by `@${{ github.actor }}`.
102+
sign-commits: true

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,48 @@ changes.
1010

1111
## [Unreleased]
1212

13+
### Added
14+
15+
### Fixed
16+
17+
### Changed
18+
19+
### Removed
20+
21+
## [v2.0.12](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.12) 2025-02-21
22+
23+
1324
### Added
1425

1526
- Add metadata url and hash to drep details [Issue 2911](https://github.com/IntersectMBO/govtool/issues/2911)
1627
- Add CC votes percentages, not voted and Ratification threshold
1728
- Add support for submitting all 7 governance action types [Issue 2258](https://github.com/IntersectMBO/govtool/issues/2258)
1829
- Add workflow to automatically update any of the @intersect.mbo package [Issue 2968](https://github.com/IntersectMBO/govtool/issues/2968)
1930
- Add Propose Governance Action button in governance actions dashboard [Issue 1188](https://github.com/IntersectMBO/govtool/issues/1188)
31+
- Add click handlers to non-interactive elements [Issue 2929](https://github.com/IntersectMBO/govtool/issues/2929)
32+
- Allow searching for yourself in DRep Directory [Issue 2993](https://github.com/IntersectMBO/govtool/issues/2993)
33+
- Add mathematical styling for governance actions [Issue 2984](https://github.com/IntersectMBO/govtool/issues/2984)
34+
- Add script to update GovTool version
35+
- Add `isStakeKeyRegistered` for the usage by pillars [Issue 2384](https://github.com/IntersectMBO/govtool/issues/2384)
36+
- Add server side compression for large assets
2037

2138
### Fixed
2239

2340
- Fix calculating votes counting for governance actions
2441
- Fix crashing backend on unhandled missing proposal from vote [Issue 2920](https://github.com/IntersectMBO/govtool/issues/2920)
2542
- Remove abstain votes (not auto abstain) from total DRep stake
2643
- Fix counting committee members [Issue 2948](https://github.com/IntersectMBO/govtool/issues/2948)
44+
- Fix refetching DRep list on every enter [Issue 2994](https://github.com/IntersectMBO/govtool/issues/2994)
45+
- Fix displaying helper buttons on governance action card details [Issue 3022](https://github.com/IntersectMBO/govtool/issues/3022)
2746

2847
### Changed
2948

3049
- Change threshold visual representation in governance action votes
3150
- Resize governance action details columns
3251
- Update @intersect.mbo/pdf-ui to v0.6.0
52+
- Bump actions/cache to v4 across workflows
53+
- Unify ADA Format across the application [Issue 3031](https://github.com/IntersectMBO/govtool/issues/3031)
54+
- Change default filtering for DRep directory to show the active DReps [Issue 3035](https://github.com/IntersectMBO/govtool/issues/3035)
3355

3456
### Removed
3557

CODEOWNERS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
* @Ryun1 @MSzalowski
55

66
# Frontend assets templates
7-
govtool/frontend/* @MSzalowski @jdyczka
8-
*.tsx @MSzalowski @jdyczka
9-
*.ts @MSzalowski @jdyczka
10-
*.css @MSzalowski @jdyczka
7+
govtool/frontend/* @MSzalowski
8+
*.tsx @MSzalowski
9+
*.ts @MSzalowski
10+
*.css @MSzalowski
1111

1212
# Backend
1313
govtool/backend/* @MSzalowski @jankun4

govtool/backend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG
44
WORKDIR /src
55
COPY . .
66
RUN cabal build
7-
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.11/x/vva-be/build/vva-be/vva-be /usr/local/bin
7+
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.12/x/vva-be/build/vva-be/vva-be /usr/local/bin

govtool/backend/Dockerfile.qovery

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG
44
WORKDIR /src
55
COPY . .
66
RUN cabal build
7-
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.11/x/vva-be/build/vva-be/vva-be /usr/local/bin
7+
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.12/x/vva-be/build/vva-be/vva-be /usr/local/bin
88

99
# Expose the necessary port
1010
EXPOSE 9876

0 commit comments

Comments
 (0)