Skip to content

Commit

Permalink
Adopt guardian/setup-scala to fix CI
Browse files Browse the repository at this point in the history
The CI is currently broken on this repository because it expects sbt to
be preinstalled on the runners but ubuntu-latest now points to an
ubuntu-24.04 build that doesn’t include sbt (e.g. see [this
build](https://github.com/guardian/flexible-restorer/actions/runs/13160341152/job/36727220402?pr=110)).

To fix CI, this commit adopts
[guardian/setup-scala](https://github.com/guardian/setup-scala) to
install sbt on the runners and configure it how we usually do.

To use setup-scala, a .tool-versions file specifying the desired version
of Java is required: this commit adds this pointing to a Java 11 version
of corretto, which this app was already using.
  • Loading branch information
emdash-ie committed Feb 5, 2025
1 parent 582b7f9 commit e1a87fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ jobs:
npm install
npm run build
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'corretto'
cache: 'sbt'
- uses: guardian/setup-scala@v1

- name: Scala Build
run: |
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java corretto-11.0.25.9.1

0 comments on commit e1a87fb

Please sign in to comment.