dfinity / examples

Example applications, microservices, and code samples for the Internet Computer
https://dfinity.org
Apache License 2.0
537 stars 362 forks source link

chore: update test workflows to use dfxvm #709

Closed ericswanson-dfinity closed 8 months ago

ericswanson-dfinity commented 8 months ago

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: https://github.com/dfinity/examples/pull/708

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

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