-
Notifications
You must be signed in to change notification settings - Fork 23
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
CI workflows configuration #5
Conversation
.github/workflows/format.yaml
Outdated
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "16" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any expectations regarding the node version the dashboard should be built with?
This comment has been minimized.
This comment has been minimized.
.github/workflows/dashboard.yaml
Outdated
@@ -0,0 +1,107 @@ | |||
name: Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we align workflows and files naming to what we have in other repos (e.g. keep-core
). We could name this file as dashboard-testnet.yml
and the workflow as Token Dashboard / Testnet
. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm cool with these changes & the related change requests so we're keeping things consistent with Keep.
@@ -0,0 +1,95 @@ | |||
name: Dashboard Build and Deploy for Mainnet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And same here regarding naming. What do you think about naming the file dashboard-mainnet.yml
and the workflow as Token Dashboard / Mainnet
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one comment - it would be good to fix this at some point, but I don't think it should block the merge.
The workflow will run on each push to main branch or a pull request to execute a yarn script that checks code formatting.
The dashboard will be built on each pull request and main branch merge. Dashboard will be build with the latest ropsten contracts for pull requests and published to a preview bucket. Once a PR is merged to main the version of dashboard will be built for ropsten and deployed to testnet bucket.
It is expected that mainnet dashboard releases are created on `releases/mainnet/*` branches. The code pushed to the branch should have dependencies updated to the versions of contracts that we want to use for mainnet. (this could be changed later to pull the latest npm packages tagged with `mainnet`). Once a PR is created a dashboard preview will be published and comment added to the PR. When the dashboard is ready to publish the deployer should manually approve the deployment.
The contracts are not yet published to NPM, nor required by the dashboard. We're leaving it as a placeholder.
We want to publish a preview of mainnet dashboard also when a push to main happens. We will build the dashboard with the latest mainnet contract dependencies.
When a new release is published we will deploy the dashboard build with the latest mainnet contracts. We also give possibility to manually invoke the workflow with workflow_dispatch.
We want to resolve the latest version of a dependency package that is a tag, so we switched to upgrade command.
Renemed the files and jobs for consistency.
The API has changed, hence we need to align with the latest changes. See more: https://github.com/actions/github-script#breaking-changes-in-v5
Preview uploaded to https://preview.dashboard.test.threshold.network/ci-setup/. |
Point to index.html for smooth reference to the website.
We do similiar for ropsten one, we need to specifiy those paramters so the bucket correctly reference the website.
Preview uploaded to https://preview.dashboard.test.threshold.network/ci-setup/index.html. |
Preview uploaded to https://preview.dashboard.test.threshold.network/ci-setup/index.html. |
CI workflows configuration Workflow: dashboard.yaml - builds, tests, and deploys for testnet (ropsten) Invoked on: * main merge (push with branches: main), * Pull Request commits (pull_request), * manually with (workflow_dispatch). Jobs: * format - runs linting and prettier code formatting checks * build-and-test - runs build; tests are not yet available in the repository * build-and-deploy-testnet - resolves latest dependencies for ropsten, then: for PR commits: builds and deploys a preview to preview.dashboard.test.threshold.network/<REF> for main merge: builds and deploys dashboard.test.threshold.network Workflow: release-mainnet.yml - builds, tests, and deploys for mainnet Invoked on: * main merge (push with branches: main), * Pull Requests on releases/mainnet/** branches, * published releases (release with types: published), * manually with (workflow_dispatch). It will pull the latest contracts dependencies pushed to npm registry and tagged with mainnet. For PR made on releases/mainnet/** branch it won't resolve the latest mainnet dependencies, but use the ones already configured in package.json. Jobs: * build-mainnet - builds dashboard and stores the artifacts for following jobs * deploy-preview-mainnet - deploys dashboard automatically to preview.dashboard.threshold.network/<REF> * deploy-mainnet - runs for published release or workflow dispatch; requires manual approval to deploy dashboard to dashboard.threshold.network
Workflow:
dashboard.yaml
- builds, tests, and deploys for testnet (ropsten)Invoked on:
push
withbranches: main
),pull_request
),workflow_dispatch
).Jobs:
format
- runs linting and prettier code formatting checksbuild-and-test
- runs build; tests are not yet available in the repositorybuild-and-deploy-testnet
- resolves latest dependencies for ropsten, then:preview.dashboard.test.threshold.network/<REF>
dashboard.test.threshold.network
Workflow:
release-mainnet.yml
- builds, tests, and deploys for mainnetInvoked on:
push
withbranches: main
),releases/mainnet/**
branches,release
withtypes: published
),workflow_dispatch
).It will pull the latest contracts dependencies pushed to npm registry and tagged with
mainnet
.For PR made on
releases/mainnet/**
branch it won't resolve the latest mainnet dependencies, but use the ones already configured inpackage.json
.Jobs:
build-mainnet
- builds dashboard and stores the artifacts for following jobsdeploy-preview-mainnet
- deploys dashboard automatically topreview.dashboard.threshold.network/<REF>
deploy-mainnet
- runs for published release or workflow dispatch; requires manual approval to deploy dashboard todashboard.threshold.network
This PR depends on #1