Skip to content

Commit c8622a7

Browse files
authored
Merge pull request #161 from threshold-network/ci-dapp-dev-2
Build previews using` dapp-development-goerli` packages **BACKGROUND:** There are situations when team developing T Token Dashboard needs to locally test some functionalities using modified contracts, for example ones with shorter authorization decrease delay. We decided to create a `dapp-development` branch in each of the expected upstream modules of the `threshold-network/token-dashboard` CI module, which would store the code of these modified contracts. (Although currently there's no `@keep-network/random-beacon`, `@keep-network/ecdsa` and `@keep-network/tbtc-v2` dependencies in the T dashboard yet, they're expected to be added soon and we are already preparing for that). Repositories with `dapp-development` branch containing modified contracts: `threshold-network/solidity-contracts` `keep-network/keep-core` `keep-network/tbtc-v2` Using the code from the `dapp-development` branch we will build packages that will be published to the NPM registry under `dapp-development-<environment>` tag and with `dapp-development-<environment>` suffix (`<environment>` currently being `goerli`). Generally, the goal of the changes is to have the full set of dapp-development-friendly contracts deployed to the NPM registry, so that they could be used to create dApp previews that will be easily testable. The dApp developers could also use the contracts to build dashboard on their local envirionment by upgrading the `token-dashboard` dependencies using `yarn upgrade <package-name>@dapp-development-goerli`. **THIS CHANGE:** In this commit we configure the `dashboard-ci.yml` workflow to use the packages tagged `dapp-development-goerli` when building PR previews. We also upgrade actions to newer versions.
2 parents 44966d6 + db72e50 commit c8622a7

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

.github/workflows/cypress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
1717
- name: Cypress run
1818
uses: cypress-io/github-action@v2
1919
with:

.github/workflows/dashboard-ci.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
name: Check code format
2626
runs-on: ubuntu-latest
2727
steps:
28-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v3
2929

30-
- uses: actions/setup-node@v2
30+
- uses: actions/setup-node@v3
3131
with:
3232
node-version: "14"
3333
cache: "yarn"
@@ -51,9 +51,9 @@ jobs:
5151
name: Build and test
5252
runs-on: ubuntu-latest
5353
steps:
54-
- uses: actions/checkout@v2
54+
- uses: actions/checkout@v3
5555

56-
- uses: actions/setup-node@v2
56+
- uses: actions/setup-node@v3
5757
with:
5858
node-version: "14"
5959
cache: "yarn"
@@ -96,7 +96,12 @@ jobs:
9696
# - name: Test
9797
# run: yarn test
9898

99-
# The code will be published to https://preview.dashboard.test.threshold.network/${{ github.head_ref }}/index.html.
99+
# This job will be triggered for PR updates. It will build the dashboard
100+
# using `dapp-development-goerli`-taggeed packages which contain contracts
101+
# with values modified to help with the testing of dashboard. The code will be
102+
# published to
103+
# https://preview.dashboard.test.threshold.network/${{ github.head_ref }}/index.html
104+
# and link to the deployment will be posted as a comment in the PR.
100105
build-and-deploy-testnet-preview:
101106
name: Deploy preview to testnet
102107
needs: build-and-test
@@ -105,7 +110,10 @@ jobs:
105110
with:
106111
environment: goerli
107112
useUpstreamBuilds: false
108-
dependentPackagesTag: goerli
113+
# We use `dapp-development-goerli`-taggeed packages with modified
114+
# contracts. They contain modifications that help with the testing of
115+
# dashboard features.
116+
dependentPackagesTag: dapp-development-goerli
109117
gcpBucketName: preview.dashboard.test.threshold.network
110118
gcpBucketPath: ${{ github.head_ref }}
111119
preview: true

.github/workflows/dashboard-mainnet.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
name: Build for mainnet
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717

18-
- uses: actions/setup-node@v2
18+
- uses: actions/setup-node@v3
1919
with:
2020
node-version: "14"
2121
cache: "yarn"
@@ -58,7 +58,7 @@ jobs:
5858
ETH_HOSTNAME_HTTP: ${{ secrets.MAINNET_ETH_HOSTNAME_HTTP }}
5959
ETH_HOSTNAME_WS: ${{ secrets.MAINNET_ETH_HOSTNAME_WS }}
6060

61-
- uses: actions/upload-artifact@v2
61+
- uses: actions/upload-artifact@v3
6262
with:
6363
name: build
6464
path: build
@@ -69,9 +69,9 @@ jobs:
6969
if: github.event_name == 'push'
7070
runs-on: ubuntu-latest
7171
steps:
72-
- uses: actions/checkout@v2
72+
- uses: actions/checkout@v3
7373

74-
- uses: actions/download-artifact@v2
74+
- uses: actions/download-artifact@v3
7575

7676
- name: Deploy PR mainnet preview to GCP
7777
uses: thesis/gcp-storage-bucket-action@v3.1.0
@@ -91,9 +91,9 @@ jobs:
9191
name: mainnet
9292
runs-on: ubuntu-latest
9393
steps:
94-
- uses: actions/checkout@v2
94+
- uses: actions/checkout@v3
9595

96-
- uses: actions/download-artifact@v2
96+
- uses: actions/download-artifact@v3
9797

9898
- name: Deploy mainnet build to GCP
9999
uses: thesis/gcp-storage-bucket-action@v3.1.0

0 commit comments

Comments
 (0)