update snapshots if cache restore failed otherwise run test normally (not all test mvn dependencies are downloaded during build phase due to skipTests) (#13740)

This commit is contained in:
Tejaswini Bandlamudi 2023-02-02 21:39:56 +05:30 committed by GitHub
parent 440212c5f9
commit 6cb842e76e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 11 deletions

View File

@ -78,7 +78,7 @@ jobs:
- name: Run IT - name: Run IT
env: env:
MYSQL_DRIVER_CLASSNAME: ${{ inputs.mysql_driver }} MYSQL_DRIVER_CLASSNAME: ${{ inputs.mysql_driver }}
MVN: ${{ format('{0} {1}', env.MVN, (steps.maven-restore.outputs.cache-hit && '-o' || '-U')) }} MVN: ${{ format('{0}{1}', env.MVN, (steps.maven-restore.outputs.cache-hit && '' || ' -U')) }}
run: | run: |
# Debug echo # Debug echo
echo "Mysql driver: ${MYSQL_DRIVER_CLASSNAME}" echo "Mysql driver: ${MYSQL_DRIVER_CLASSNAME}"

View File

@ -91,5 +91,5 @@ jobs:
- name: test & coverage - name: test & coverage
env: env:
MAVEN_PROJECTS: ${{ inputs.maven_projects }} MAVEN_PROJECTS: ${{ inputs.maven_projects }}
MVN: ${{ format('{0} {1}', env.MVN, (steps.maven-restore.outputs.cache-hit && '-o' || '-U')) }} MVN: ${{ format('{0}{1}', env.MVN, (steps.maven-restore.outputs.cache-hit && '' || ' -U')) }}
run: ./.github/scripts/unit_tests_script.sh run: ./.github/scripts/unit_tests_script.sh

View File

@ -43,15 +43,6 @@ jobs:
- name: Checkout branch - name: Checkout branch
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Cache Maven m2 repository
id: maven
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ matrix.jdk }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-${{ runner.os }}-${{ matrix.jdk }}
- name: Setup java - name: Setup java
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
@ -63,6 +54,15 @@ jobs:
run: | run: |
./it.sh ci ./it.sh ci
- name: Cache Maven m2 repository
id: maven
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ matrix.jdk }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-${{ runner.os }}-${{ matrix.jdk }}
- name: Cache targets - name: Cache targets
id: target id: target
uses: actions/cache@v3 uses: actions/cache@v3