Skip to content

Conversation

@elliottt
Copy link
Contributor

@elliottt elliottt commented Jun 22, 2022

This change allows us to run node .github/actions/compute-sdk-test/main.js without first running npm build in that directory. We still need to run npm install there, but this simplifies iteration when working locally.

I also updated the install-rust action to node16 while I was at it.

@elliottt elliottt force-pushed the trevor/run-js-directly branch 2 times, most recently from e72fc3c to b1b98e0 Compare June 22, 2022 23:23
@elliottt elliottt changed the title Avoid needing to build the js for the compute-sdk tests Allow the compute-sdk tests to run without building locally Jun 22, 2022
@elliottt elliottt force-pushed the trevor/run-js-directly branch from 8e6c29e to b7e2fd9 Compare June 22, 2022 23:43
@elliottt elliottt force-pushed the trevor/run-js-directly branch from b7e2fd9 to e6fbc1e Compare June 22, 2022 23:49
@elliottt elliottt marked this pull request as ready for review June 23, 2022 00:04
@jameysharp
Copy link
Contributor

I haven't really reviewed this yet, but a quick thought regarding the install-rust action specifically: it's almost empty now, it should probably be a shell fragment in a composite action instead, or even just be inlined into the only place it's used in the main workflow.

@elliottt
Copy link
Contributor Author

I haven't really reviewed this yet, but a quick thought regarding the install-rust action specifically: it's almost empty now, it should probably be a shell fragment in a composite action instead, or even just be inlined into the only place it's used in the main workflow.

Seems reasonable to me! I switched it over to a composite action in the third commit.

@elliottt elliottt force-pushed the trevor/run-js-directly branch from 7e1f7a0 to 4818fb7 Compare June 23, 2022 02:32
echo 'CARGO_PROFILE_DEV_DEBUG=1' >> "$GITHUB_ENV"
echo 'CARGO_PROFILE_TEST_DEBUG=1' >> "$GITHUB_ENV"
- if: ${{ ! startsWith(inputs.toolchain, 'nightly') }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yeah, this reminds me: I broke the "toolchain" input when I switched this over to just reading rust-toolchain.toml. That input no longer controls the toolchain that's getting installed. So this test doesn't do what any reasonable person would think it's doing. I definitely agree this commit accurately translates main.js as it stands now into a composite action though!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should figure out if we'd like to keep this. It seems nice to have a reusable place to setup the environment variables we're relying on, but the action name seems a bit misleading now :)

Copy link
Contributor

Choose a reason for hiding this comment

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

rustup show does install the toolchain though, as a side-effect. 😆 Maybe I should have commented to that effect when I made that change... It just has the nice bonus of recording in the CI log exactly what toolchain it ran with.

@elliottt elliottt merged commit c45c378 into main Jun 23, 2022
@elliottt elliottt deleted the trevor/run-js-directly branch June 23, 2022 18:11
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.

4 participants