Skip to content

Commit b354b15

Browse files
author
Michel Davit
committed
Add GHA cache for intelliJ
1 parent 1b6513e commit b354b15

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

.github/workflows/ci.yml

+12
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ jobs:
5151
if: matrix.java == 'corretto@17' && steps.setup-java-corretto-17.outputs.cache-hit == 'false'
5252
run: sbt +update
5353

54+
- name: Cache
55+
uses: actions/cache@v4
56+
with:
57+
path: ~/.scio-ideaPluginIC
58+
key: idea-2022.3.1
59+
5460
- name: Check that workflows are up to date
5561
run: sbt githubWorkflowCheck
5662

@@ -100,6 +106,12 @@ jobs:
100106
if: matrix.java == 'corretto@17' && steps.setup-java-corretto-17.outputs.cache-hit == 'false'
101107
run: sbt +update
102108

109+
- name: Cache
110+
uses: actions/cache@v4
111+
with:
112+
path: ~/.scio-ideaPluginIC
113+
key: idea-2022.3.1
114+
103115
- name: Download target directories (2.13)
104116
uses: actions/download-artifact@v4
105117
with:

build.sbt

+16-5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ disablePlugins(TypelevelCiSigningPlugin)
2020
lazy val Guava = "com.google.guava" % "guava" % "32.1.3-jre"
2121
lazy val Scalatest = "org.scalatest" %% "scalatest" % "3.2.18"
2222

23+
// idea settings
24+
lazy val intelliJVersion = "2022.3.1"
25+
ThisBuild / intellijPluginName := "scio-idea"
26+
ThisBuild / intellijPlatform := IntelliJPlatform.IdeaCommunity
27+
ThisBuild / intellijBuild := intelliJVersion
2328

2429
// project
2530
ThisBuild / tlBaseVersion := "0.1"
@@ -46,11 +51,17 @@ ThisBuild / githubWorkflowPublish := Seq(
4651
env = Map("IJ_PLUGIN_REPO_TOKEN" -> "${{ secrets.IJ_PLUGIN_TOKEN }}")
4752
)
4853
)
49-
50-
// idea settings
51-
ThisBuild / intellijPluginName := "scio-idea"
52-
ThisBuild / intellijPlatform := IntelliJPlatform.IdeaCommunity
53-
ThisBuild / intellijBuild := "2022.3.1" // 1st java 17 version
54+
val cache = UseRef.Public("actions", "cache", "v4")
55+
ThisBuild / githubWorkflowGeneratedCacheSteps := Seq(
56+
WorkflowStep.Use(
57+
name = Some("Cache"),
58+
ref = cache,
59+
params = Map(
60+
"path" -> "~/.scio-ideaPluginIC",
61+
"key" -> s"idea-$intelliJVersion",
62+
)
63+
)
64+
)
5465

5566
lazy val scioIdeaPlugin: Project = project
5667
.in(file("."))

0 commit comments

Comments
 (0)