Skip to content

Run integration test against testnets for external PRs #2221

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

Merged
merged 11 commits into from
Dec 14, 2022

Conversation

danielelisi
Copy link
Contributor

@danielelisi danielelisi commented Dec 8, 2022

External PRs from users outside our ecadlabs GH org don't have access to GH Secrets. This is an intended behaviour to avoid exposing sensitive keys and tokens to third parties.

We block some resource-intensive RPC endpoints from our public-facing nodes. Since some integration tests need to contact these RPC endpoints we let GH runners join our private network and contact internal RPC Tezos nodes directly. GH Runners use GH Secrets to join our Tailscale private network.

This PR refactors the GH workflows and skips the baking_rights and endorsing_rights tests when an external user submits a PR to Taquito. Additionally, we set the keygen keyURL to point to the publicly accessible keygen instance so that we can request keys without having to login to our private network.

I've also added a condition to skip the deploy-edge-package workflow on external PRs. Similarly to what I mentioned above, Github Secrets aren't available on external PRs and this job would always fail as it requires a secret to publish the packages on Verdaccio. Also, this is a security consideration as we don't want to allow external users to arbitrarily publish packages to an NPM registry.

Test Plan

Opened a PR as an external contributor and confirmed that:

  • the Tailscale job is skipped
  • Integration test the public RPC endpoint

Example workflow run from an external PR https://github.com/ecadlabs/taquito/pull/2223/checks

@netlify
Copy link

netlify bot commented Dec 8, 2022

Deploy Preview for taquito-test-dapp canceled.

Name Link
🔨 Latest commit e465f5d
🔍 Latest deploy log https://app.netlify.com/sites/taquito-test-dapp/deploys/639a096bc450cf0008481426

@github-actions
Copy link

github-actions bot commented Dec 8, 2022

New packages have been deployed to the preview repository at https://npm.preview.tezostaquito.io/.

Published packages:

npm i @taquito/michel-codec@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/local-forging@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/taquito@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/utils@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/contracts-library@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/ledger-signer@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/beacon-wallet@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/tzip16@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/remote-signer@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/rpc@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/signer@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/tzip12@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/michelson-encoder@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/http-utils@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/
npm i @taquito/sapling@15.0.0-73260ca6--2221 --registry https://npm.preview.tezostaquito.io/

@github-actions
Copy link

github-actions bot commented Dec 8, 2022

A new deploy preview is available on Netlify at https://73260ca--tezostaquito.netlify.app

@danielelisi danielelisi force-pushed the skip_test_public_endpoint branch from 0ce44bd to 8934c4b Compare December 14, 2022 01:01
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
# TODO: remove after debugging
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be deleted?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah thanks for catching it! removed the debug statements

@danielelisi danielelisi merged commit fe7cf1c into master Dec 14, 2022
@danielelisi danielelisi deleted the skip_test_public_endpoint branch December 14, 2022 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants