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

Ensure sbt is properly installed in GitHub actions #738

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

adamnfish
Copy link
Contributor

What does this change?

Using the Guardian-provided setup-scala workflow allows us to configure and install Java and sbt at the same time. It takes the Java version out of the .tool-versions file, so this file is also added with a (currently) up-to-date Java version.

How to test

We should see the workflows complete successfully now.

How can we measure success?

We'll avoid these workflows breaking when GitHub starts to roll-out the new base image from 5th Dec.

Have we considered potential risks?

We're specifying a needlessly specific Java version in the .tool-versions file, to appease asdf. We will separately migrate to just the major version by adopting mise, but this is something to change globally when we are ready.

@adamnfish adamnfish requested a review from a team as a code owner December 4, 2024 16:34
@adamnfish adamnfish force-pushed the add-guardian-setup-scala-to-workflows branch from 28b70c0 to 0b2a7d9 Compare December 4, 2024 16:35
@adamnfish adamnfish changed the title Switches actions/setup-java for guardian/setup-java Switches actions/setup-java for guardian/setup-scala Dec 4, 2024
@adamnfish adamnfish changed the title Switches actions/setup-java for guardian/setup-scala Ensure sbt is properly installed in GitHub actions Dec 4, 2024
@akash1810
Copy link
Member

#740 is failing CI with "sbt not found". Merging this to resolve.

This allows us to also setup sbt at the same time, and simplify the
workflow configuration. We take the Java version out of the
.tool-versions file, so this is also added with a (currently)
up-to-date Java version.
@akash1810 akash1810 force-pushed the add-guardian-setup-scala-to-workflows branch from 0b2a7d9 to 1f2dff5 Compare December 17, 2024 17:40
@akash1810 akash1810 enabled auto-merge December 17, 2024 17:40
@akash1810 akash1810 merged commit 59c3bd9 into main Dec 17, 2024
3 checks passed
@akash1810 akash1810 deleted the add-guardian-setup-scala-to-workflows branch December 17, 2024 17:42
bryophyta added a commit to guardian/newswires that referenced this pull request Jan 6, 2025
…bt, following the removal of sbt from Github's base images.

See [prior example](guardian/amiable#738).

Also adds a `.tool-versions` file specifying the version of Java to use in the action, and removes the old `.java-version` file because afaict it was only being used by the `setup-java` action that's been removed above.
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