Skip to content

Commit

Permalink
Updating ci.yml with caching of maven dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mjovanc committed Nov 24, 2023
1 parent cff1a1d commit 5a79322
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: build

on:
push:
branches:
- master
pull_request:

jobs:
Expand All @@ -25,7 +27,15 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'

- name: Cache Maven dependencies
uses: actions/cache@v2
with:
path: |
~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/*.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Assemble
run: mvn install
Expand All @@ -43,7 +53,15 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'

- name: Cache Maven dependencies
uses: actions/cache@v2
with:
path: |
~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/*.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run Unit Test
run: mvn test

0 comments on commit 5a79322

Please sign in to comment.