-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use a single shared Maven cache for all workflows
Part of #1656
- Loading branch information
Showing
6 changed files
with
92 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,14 @@ jobs: | |
with: | ||
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | ||
java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax | ||
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies | ||
|
||
- name: Restore existing cache | ||
uses: actions/[email protected] # https://github.com/actions/cache | ||
with: | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | ||
key: maven-repository-${{ hashFiles('pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: maven-repository- | ||
|
||
- name: Build WAR file | ||
# NOTE: we use -Dmaven.test.skip=true instead of -DskipUnitTests=true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,13 @@ jobs: | |
with: | ||
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | ||
java-version: ${{ matrix.java-version }} # https://github.com/actions/setup-java#supported-version-syntax | ||
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies | ||
- name: Restore existing cache | ||
uses: actions/[email protected] # https://github.com/actions/cache | ||
with: | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | ||
key: maven-repository-${{ hashFiles('pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: maven-repository- | ||
- name: Run integration tests | ||
run: ./src/main/scripts/execute-command.sh integration-tests | ||
- name: Save RobotFramework reports | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,13 @@ jobs: | |
with: | ||
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | ||
java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax | ||
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies | ||
- name: Restore existing cache | ||
uses: actions/[email protected] # https://github.com/actions/cache | ||
with: | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | ||
key: maven-repository-${{ hashFiles('pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: maven-repository- | ||
# This is a workaround for github action limitation: we can't specify command for the service (--character-set-server=utf8) | ||
# and have to modify database manually. See also: | ||
# https://github.com/actions/runner/discussions/1872 and https://github.com/orgs/community/discussions/26688 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,13 @@ jobs: | |
with: | ||
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | ||
java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax | ||
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies | ||
- name: Restore existing cache | ||
uses: actions/[email protected] # https://github.com/actions/cache | ||
with: | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | ||
key: maven-repository-${{ hashFiles('pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: maven-repository- | ||
- name: Run integration tests | ||
env: | ||
SPRING_PROFILES_ACTIVE: postgres | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,13 @@ jobs: | |
with: | ||
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | ||
java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax | ||
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies | ||
- name: Restore existing cache | ||
uses: actions/[email protected] # https://github.com/actions/cache | ||
with: | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | ||
key: maven-repository-${{ hashFiles('pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: maven-repository- | ||
- name: Run CheckStyle | ||
run: ./src/main/scripts/execute-command.sh checkstyle | ||
|
||
|
@@ -49,7 +55,13 @@ jobs: | |
with: | ||
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | ||
java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax | ||
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies | ||
- name: Restore existing cache | ||
uses: actions/[email protected] # https://github.com/actions/cache | ||
with: | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | ||
key: maven-repository-${{ hashFiles('pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: maven-repository- | ||
- name: Run PMD | ||
run: ./src/main/scripts/execute-command.sh pmd | ||
|
||
|
@@ -68,7 +80,13 @@ jobs: | |
with: | ||
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | ||
java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax | ||
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies | ||
- name: Restore existing cache | ||
uses: actions/[email protected] # https://github.com/actions/cache | ||
with: | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | ||
key: maven-repository-${{ hashFiles('pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: maven-repository- | ||
- name: Check license header | ||
run: ./src/main/scripts/execute-command.sh check-license | ||
|
||
|
@@ -87,7 +105,13 @@ jobs: | |
with: | ||
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | ||
java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax | ||
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies | ||
- name: Restore existing cache | ||
uses: actions/[email protected] # https://github.com/actions/cache | ||
with: | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | ||
key: maven-repository-${{ hashFiles('pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: maven-repository- | ||
- name: Check pom.xml | ||
run: ./src/main/scripts/execute-command.sh check-pom | ||
|
||
|
@@ -192,7 +216,13 @@ jobs: | |
with: | ||
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | ||
java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax | ||
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies | ||
- name: Restore existing cache | ||
uses: actions/[email protected] # https://github.com/actions/cache | ||
with: | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | ||
key: maven-repository-${{ hashFiles('pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: maven-repository- | ||
- name: Run maven-enforcer-plugin | ||
run: ./src/main/scripts/execute-command.sh enforcer | ||
|
||
|
@@ -211,7 +241,13 @@ jobs: | |
with: | ||
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | ||
java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax | ||
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies | ||
- name: Restore existing cache | ||
uses: actions/[email protected] # https://github.com/actions/cache | ||
with: | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | ||
key: maven-repository-${{ hashFiles('pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: maven-repository- | ||
- name: Compile sources | ||
run: >- | ||
mvn \ | ||
|
@@ -237,7 +273,13 @@ jobs: | |
with: | ||
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | ||
java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax | ||
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies | ||
- name: Restore existing cache | ||
uses: actions/[email protected] # https://github.com/actions/cache | ||
with: | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | ||
key: maven-repository-${{ hashFiles('pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: maven-repository- | ||
- name: Compile sources | ||
run: >- | ||
mvn \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,13 @@ jobs: | |
with: | ||
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | ||
java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax | ||
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies | ||
- name: Restore existing cache | ||
uses: actions/[email protected] # https://github.com/actions/cache | ||
with: | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | ||
key: maven-repository-${{ hashFiles('pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: maven-repository- | ||
- name: Run Jest | ||
run: ./src/main/scripts/execute-command.sh jest | ||
|
||
|
@@ -49,6 +55,12 @@ jobs: | |
with: | ||
distribution: 'adopt' # https://github.com/actions/setup-java#supported-distributions | ||
java-version: '8' # https://github.com/actions/setup-java#supported-version-syntax | ||
cache: 'maven' # https://github.com/actions/setup-java#caching-packages-dependencies | ||
- name: Restore existing cache | ||
uses: actions/[email protected] # https://github.com/actions/cache | ||
with: | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action | ||
key: maven-repository-${{ hashFiles('pom.xml') }} | ||
path: ~/.m2/repository | ||
restore-keys: maven-repository- | ||
- name: Run unit tests | ||
run: ./src/main/scripts/execute-command.sh unit-tests |