Skip to content

Commit 31b11a8

Browse files
committed
Switch to sbt-typelevel-github-actions
1 parent 38739da commit 31b11a8

File tree

2 files changed

+35
-20
lines changed

2 files changed

+35
-20
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,55 +16,70 @@ on:
1616
env:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818

19+
20+
concurrency:
21+
group: ${{ github.workflow }} @ ${{ github.ref }}
22+
cancel-in-progress: true
23+
1924
jobs:
2025
build:
21-
name: Build and Test
26+
name: Test
2227
strategy:
2328
matrix:
24-
os: [ubuntu-latest]
29+
os: [ubuntu-22.04]
2530
scala: [2.12.15, 2.11.12, 2.13.8, 3.0.2]
2631
java: [temurin@8, temurin@11, temurin@17]
2732
runs-on: ${{ matrix.os }}
33+
timeout-minutes: 60
2834
steps:
2935
- name: Checkout current branch (full)
30-
uses: actions/checkout@v2
36+
uses: actions/checkout@v4
3137
with:
3238
fetch-depth: 0
3339

40+
- name: Setup sbt
41+
uses: sbt/setup-sbt@v1
42+
3443
- name: Setup Java (temurin@8)
44+
id: setup-java-temurin-8
3545
if: matrix.java == 'temurin@8'
36-
uses: actions/setup-java@v2
46+
uses: actions/setup-java@v4
3747
with:
3848
distribution: temurin
3949
java-version: 8
50+
cache: sbt
51+
52+
- name: sbt update
53+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
54+
run: sbt +update
4055

4156
- name: Setup Java (temurin@11)
57+
id: setup-java-temurin-11
4258
if: matrix.java == 'temurin@11'
43-
uses: actions/setup-java@v2
59+
uses: actions/setup-java@v4
4460
with:
4561
distribution: temurin
4662
java-version: 11
63+
cache: sbt
64+
65+
- name: sbt update
66+
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
67+
run: sbt +update
4768

4869
- name: Setup Java (temurin@17)
70+
id: setup-java-temurin-17
4971
if: matrix.java == 'temurin@17'
50-
uses: actions/setup-java@v2
72+
uses: actions/setup-java@v4
5173
with:
5274
distribution: temurin
5375
java-version: 17
76+
cache: sbt
5477

55-
- name: Cache sbt
56-
uses: actions/cache@v4
57-
with:
58-
path: |
59-
~/.sbt
60-
~/.ivy2/cache
61-
~/.coursier/cache/v1
62-
~/.cache/coursier/v1
63-
~/AppData/Local/Coursier/Cache/v1
64-
~/Library/Caches/Coursier/v1
65-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
78+
- name: sbt update
79+
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
80+
run: sbt +update
6681

6782
- name: Check that workflows are up to date
68-
run: sbt ++${{ matrix.scala }} githubWorkflowCheck
83+
run: sbt githubWorkflowCheck
6984

70-
- run: sbt ++${{ matrix.scala }} testIfRelevant mimaReportBinaryIssues
85+
- run: sbt '++ ${{ matrix.scala }}' testIfRelevant mimaReportBinaryIssues

project/plugin-github-actions.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")
1+
addSbtPlugin("org.typelevel" % "sbt-typelevel-github-actions" % "0.8.0")

0 commit comments

Comments
 (0)