Skip to content

Commit

Permalink
add comments to explain cache behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
xvrl committed Oct 5, 2023
1 parent 8b6d79b commit 0372dac
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/reusable-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,15 @@ jobs:
with:
fetch-depth: 0

# skip the "cache: maven" step from setup-jave since we restore it below
# skip the "cache: maven" step from setup-java. We explicitly use a
# different cache key since we cannot reuse it across commits.
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ inputs.jdk }}

# the build step produces SNAPSHOT artifacts into the local maven repository,
# we include github.sha in the cache key to make it specific to that build/jdk
- name: Restore Maven repository
id: maven-restore
uses: actions/cache/restore@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/standard-its.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ jobs:
- name: Setup java
run: export JAVA_HOME=$JAVA_HOME_8_X64

# the build step produces SNAPSHOT artifacts into the local maven repository,
# we include github.sha in the cache key to make it specific to that build/jdk
- name: Restore Maven repository
id: maven-restore
uses: actions/cache/restore@v3
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/unit-and-integration-tests-unified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,15 @@ jobs:
- name: Checkout branch
uses: actions/checkout@v3

# skip the "cache: maven" step from setup-java. We explicitly use a
# different cache key since we cannot reuse it across commits.
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}

# the build step produces SNAPSHOT artifacts into the local maven repository,
# we include github.sha in the cache key to make it specific to that build/jdk
- name: Cache Maven m2 repository
id: maven
uses: actions/cache@v3
Expand Down

0 comments on commit 0372dac

Please sign in to comment.