Skip to content
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

chore: update test workflows to use dfxvm #709

Merged
merged 8 commits into from
Feb 9, 2024

Conversation

ericswanson-dfinity
Copy link
Member

@ericswanson-dfinity ericswanson-dfinity commented Feb 9, 2024

Overview
Make it so the example workflows will still work after dfxvm is released.

There were a few tests that call dfx upgrade. Since I guess the intent of their maintainers is to always use the latest version of dfx, I changed those to call dfxvm update.

Also removed motoko/encrypted-notes-dapp-vetkd/provision-darwin.sh, which was only used to pin the Node version. The related test now uses dfx 0.16.1.

Requirements
The workflows need to work now, and they need to work after we cut over the install script at https://internetcomputer.org/install.sh to install dfxvm.

Considered Solutions
Another option would be to use the dfinity/setup-dfx action: #708

The reason I closed that PR is that it would require one of the following:

  • require each workflow to specify a version (meaning upgrading to a newer version of dfx means touching every workflow)
  • most workflows use the latest dfx (meaning no reproducibility, as by default tests would then use whatever is the latest dfx version)

An advantage of the approach is that the setup-dfx workflow works with today's dfx install script, and will also work with dfxvm's install script.

Recommended Solution
Recommend going ahead with this PR, so that future updates to use a newer dfx only have to touch the provision scripts.

Considerations
After dfxvm 1.0 is released (in a few weeks time), we need to update the provision scripts to fetch https://internetcomputer.org/install.sh

@ericswanson-dfinity ericswanson-dfinity changed the title chore: update provision scripts to be compatible with dfxvm chore: update provision scripts to be use dfxvm Feb 9, 2024
@ericswanson-dfinity ericswanson-dfinity changed the title chore: update provision scripts to be use dfxvm chore: update provision scripts to use dfxvm Feb 9, 2024
@ericswanson-dfinity ericswanson-dfinity changed the title chore: update provision scripts to use dfxvm chore: update test workflows to use dfxvm Feb 9, 2024
@ericswanson-dfinity ericswanson-dfinity marked this pull request as ready for review February 9, 2024 17:50
@ericswanson-dfinity ericswanson-dfinity requested a review from a team as a code owner February 9, 2024 17:50
Copy link
Contributor

@lwshang lwshang Feb 9, 2024

Choose a reason for hiding this comment

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

This is almost the same as github/workflows/provision-darwin.sh.
The only two differences are:

  • Node version
  • DFX_VERSION

Probably, we can get rid of this slightly adjusted version.
Let this example use the .github/ script and add a dfxvm install 0.12.0 step if we DO have to use this particular version.
Or maybe it's fine to use the latest version of dfx.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changing the versions involved is beyond the scope of this PR, but I can eliminate this script

@ericswanson-dfinity ericswanson-dfinity merged commit 1802f72 into master Feb 9, 2024
120 of 133 checks passed
@ericswanson-dfinity ericswanson-dfinity deleted the dfxvm-compatible branch February 9, 2024 20:26
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.

3 participants