Skip to content

Commit

Permalink
HSEARCH-4072 Add cache to GH workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Yoann Rodière <yoann@hibernate.org>
  • Loading branch information
yrodiere authored and fax4ever committed Nov 9, 2020
1 parent 7961ad9 commit dd4579c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/contributor-build.yml
Expand Up @@ -31,6 +31,18 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 11
- name: Get year/month for cache key
id: get-date
run: |
echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
shell: bash
- name: Cache Maven local repository
uses: actions/cache@v2
id: cache-maven
with:
path: ~/.m2/repository
# refresh cache every month to avoid unlimited growth
key: maven-localrepo-${{ steps.get-date.outputs.yearmonth }}
- name: Set up Maven
run: ./mvnw -v
- name: Build and test
Expand All @@ -41,3 +53,5 @@ jobs:
with:
name: test-reports-java11
path: './**/*-reports/'
- name: Omit produced artifacts from build cache
run: rm -r ~/.m2/repository/org/hibernate/search

0 comments on commit dd4579c

Please sign in to comment.