Skip to content

Commit 5cf4704

Browse files
fix: Install sbt in GitHub workflow
Adds a step to explicitly install sbt using apt-get in the GitHub Actions workflow (.github/workflows/scala.yml). This is done for both the 'test' and 'lint' jobs after Java has been set up. This addresses the 'sbt: command not found' error encountered in previous workflow runs.
1 parent a6f9210 commit 5cf4704

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/scala.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ jobs:
1111
java-version: '11'
1212
distribution: 'temurin'
1313
cache: 'sbt'
14+
- name: Install sbt
15+
run: |
16+
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
17+
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
18+
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add -
19+
sudo apt-get update
20+
sudo apt-get install -y sbt
1421
- name: Run tests
1522
run: sbt coverage test
1623
- name: Coverage Report
@@ -29,5 +36,12 @@ jobs:
2936
java-version: '11'
3037
distribution: 'temurin'
3138
cache: 'sbt'
39+
- name: Install sbt
40+
run: |
41+
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
42+
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
43+
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add -
44+
sudo apt-get update
45+
sudo apt-get install -y sbt
3246
- name: Formatting
3347
run: sbt scalafmtSbtCheck scalafmtCheck test:scalafmtCheck

0 commit comments

Comments
 (0)