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: use dfinity/setup-dfx github action #708

Closed ericswanson-dfinity closed 8 months ago

ericswanson-dfinity commented 8 months ago

Overview This is to be compatible with dfxvm once it's released.

I also updated all of the workflows to use actions/checkout@v4. This PR is split into two commits: the first updates to actions/checkout@v4, the second updates to use dfinity/setup-dfx.

Requirements These tests should install dfx now, and after dfxvm is released.

Considered Solutions Another option would have been to copy the path setup from https://github.com/dfinity/setup-dfx/blob/main/action.yml into the provision scripts.

# Linux
echo "$HOME/.local/share/dfx/bin" >> $GITHUB_PATH
# Macos
echo "$HOME/Library/Application Support/org.dfinity.dfx/bin" >> $GITHUB_PATH

Recommended Solution There's a github action now, so it seems nice to use it. Also the workflows used to use a couple different methods of overriding the dfx version. Now there's just one:

      - uses: dfinity/setup-dfx@main
        with:
          dfx-version: 0.14.2

Considerations This should reduce maintenance costs going forward, since https://github.com/dfinity/setup-dfx should be able to perform its part.

ericswanson-dfinity commented 8 months ago

Closed because this change would mean one of two things: