From 5a7925806b9906641fac289da38f42e22d42c68f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michalina=20Ciencia=C5=82a?= Date: Thu, 18 Aug 2022 14:39:33 +0200 Subject: [PATCH 1/3] 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-` tag and with `dapp-dev-` suffix (`` 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 @dapp-development-goerli`. **THIS CHANGE:** in this commit we configure the `dashboard-ci.yml` workflow to use the packages tagged `dapp-dev-goerli` when building PR previews. --- .github/workflows/dashboard-ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dashboard-ci.yml b/.github/workflows/dashboard-ci.yml index f9bdb08fe..2bcdf6fcc 100644 --- a/.github/workflows/dashboard-ci.yml +++ b/.github/workflows/dashboard-ci.yml @@ -91,7 +91,12 @@ jobs: # - name: Test # run: yarn test - # The code will be published to https://preview.dashboard.test.threshold.network/${{ github.head_ref }}/index.html. + # This job will be triggered for PR updates. It will build the dashboard + # using `dapp-development-goerli`-taggeed packages which contain contracts + # with values modified to help with the testing of dashboard. The code will be + # published to + # https://preview.dashboard.test.threshold.network/${{ github.head_ref }}/index.html + # and link to the deployment will be posted as a comment in the PR. build-and-deploy-testnet-preview: name: Deploy preview to testnet needs: build-and-test @@ -106,7 +111,10 @@ jobs: ethUrlHttp: ${{ secrets.GOERLI_ETH_HOSTNAME_HTTP }} ethUrlWS: ${{ secrets.GOERLI_ETH_HOSTNAME_WS }} useUpstreamBuilds: false - dependentPackagesTag: goerli + # We use `dapp-development-goerli`-taggeed packages with modified + # contracts. They contain modifications that help with the testing of + # dashboard features. + dependentPackagesTag: dapp-development-goerli gcpServiceKey: ${{ secrets.KEEP_TEST_CI_UPLOAD_DAPP_JSON_KEY_BASE64 }} gcpBucketName: preview.dashboard.test.threshold.network gcpBucketPath: ${{ github.head_ref }} From 3c165490f205d65955ea61112386f71c3837ef61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michalina=20Ciencia=C5=82a?= Date: Thu, 18 Aug 2022 14:54:39 +0200 Subject: [PATCH 2/3] Upgrade actions to newer versions --- .github/workflows/cypress.yml | 2 +- .github/workflows/dashboard-ci.yml | 8 ++++---- .github/workflows/dashboard-mainnet.yml | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 355086b19..375822edd 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Cypress run uses: cypress-io/github-action@v2 with: diff --git a/.github/workflows/dashboard-ci.yml b/.github/workflows/dashboard-ci.yml index 2bcdf6fcc..81ed99c0e 100644 --- a/.github/workflows/dashboard-ci.yml +++ b/.github/workflows/dashboard-ci.yml @@ -25,9 +25,9 @@ jobs: name: Check code format runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: node-version: "16" cache: "yarn" @@ -51,9 +51,9 @@ jobs: name: Build and test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: node-version: "16" cache: "yarn" diff --git a/.github/workflows/dashboard-mainnet.yml b/.github/workflows/dashboard-mainnet.yml index 53d8495f6..812c80235 100644 --- a/.github/workflows/dashboard-mainnet.yml +++ b/.github/workflows/dashboard-mainnet.yml @@ -13,9 +13,9 @@ jobs: name: Build for mainnet runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: node-version: "16" cache: "yarn" @@ -58,7 +58,7 @@ jobs: ETH_HOSTNAME_HTTP: ${{ secrets.MAINNET_ETH_HOSTNAME_HTTP }} ETH_HOSTNAME_WS: ${{ secrets.MAINNET_ETH_HOSTNAME_WS }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: build path: build @@ -69,9 +69,9 @@ jobs: if: github.event_name == 'push' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 - name: Deploy PR mainnet preview to GCP uses: thesis/gcp-storage-bucket-action@v3.1.0 @@ -91,9 +91,9 @@ jobs: name: mainnet runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 - name: Deploy mainnet build to GCP uses: thesis/gcp-storage-bucket-action@v3.1.0 From db72e501476aa7df62887ea95cf01cbecbc91a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michalina=20Ciencia=C5=82a?= Date: Tue, 20 Sep 2022 11:22:24 +0200 Subject: [PATCH 3/3] Fix formatting --- .github/workflows/dashboard-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dashboard-ci.yml b/.github/workflows/dashboard-ci.yml index a9e041599..1483f37aa 100644 --- a/.github/workflows/dashboard-ci.yml +++ b/.github/workflows/dashboard-ci.yml @@ -96,10 +96,10 @@ jobs: # - name: Test # run: yarn test - # This job will be triggered for PR updates. It will build the dashboard + # This job will be triggered for PR updates. It will build the dashboard # using `dapp-development-goerli`-taggeed packages which contain contracts # with values modified to help with the testing of dashboard. The code will be - # published to + # published to # https://preview.dashboard.test.threshold.network/${{ github.head_ref }}/index.html # and link to the deployment will be posted as a comment in the PR. build-and-deploy-testnet-preview: @@ -112,7 +112,7 @@ jobs: useUpstreamBuilds: false # We use `dapp-development-goerli`-taggeed packages with modified # contracts. They contain modifications that help with the testing of - # dashboard features. + # dashboard features. dependentPackagesTag: dapp-development-goerli gcpBucketName: preview.dashboard.test.threshold.network gcpBucketPath: ${{ github.head_ref }}