From c1800dde603f873c6b5e4c2c4d2d10a0b0a81c0b Mon Sep 17 00:00:00 2001 From: realkaranvir <113927390+realkaranvir@users.noreply.github.com> Date: Sun, 8 Dec 2024 12:04:56 -0800 Subject: [PATCH] caching depenencies for Scala CI --- .github/workflows/scala.yml | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index d4b20044e..14dc8d826 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -2,20 +2,33 @@ name: Scala CI on: push: - branches: [ master ] + branches: [karan] pull_request: - branches: [ master ] + branches: [master] jobs: build_and_test: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Run tests - run: sbt clean compile test + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Cache sbt dependencies + uses: actions/cache@v3 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.coursier + key: sbt-${{ runner.os }}-${{ hashFiles('**/*.sbt') }} + restore-keys: | + sbt-${{ runner.os }}- + + - name: Run tests + run: sbt clean compile test