Skip to content

Commit

Permalink
cache application
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Aug 21, 2024
1 parent 3eda7d4 commit 04d17d0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/angular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,9 @@ jobs:
uses: jwalton/gh-docker-logs@v2
- name: 'ANALYSIS: Sonar analysis'
if: >-
github.event_name == 'push' &&
github.repository == 'jhipster/generator-jhipster' &&
matrix.sonar-analyse == 'true' &&
steps.compare.outputs.equals != 'true' &&
matrix.workspaces != 'true' &&
matrix.skip-frontend-tests != 'true' &&
needs.build-matrix.outputs.client != 'false' &&
matrix.skip-backend-tests != 'true' &&
needs.build-matrix.outputs.server != 'false'
github.event_name == 'push' &&
matrix.sonar-analyse == 'true'
run: |
./mvnw -ntp --batch-mode initialize org.jacoco:jacoco-maven-plugin:prepare-agent sonar:sonar \
-Dsonar.host.url=https://sonarcloud.io \
Expand All @@ -191,6 +185,14 @@ jobs:
-Dsonar.login=$SONAR_TOKEN
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: 'Store application'
if: >-
github.event_name == 'push' &&
matrix.sonar-analyse == 'true'
uses: actions/cache/save@v4
with:
path: app
key: application-${{ matrix.name }}-${{ github.sha }}
check-angular:
permissions:
contents: none
Expand Down
4 changes: 2 additions & 2 deletions test-integration/scripts/99-write-matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ writeFileSync(
'jhipster-bom-cicd-version': BUILD_JHIPSTER_BOM ? JHIPSTER_BOM_CICD_VERSION : undefined,
'gradle-cache': generatorOptions?.workspaces || name.includes('gradle') ? true : undefined,
...sample,
'skip-backend-tests': sample['skip-backend-tests'] ? 'true' : 'false',
'skip-frontend-tests': sample['skip-frontend-tests'] ? 'true' : 'false',
'skip-backend-tests': sample['skip-backend-tests'] && sample['sonar-analyse'] !== 'true' ? 'true' : 'false',
'skip-frontend-tests': sample['skip-frontend-tests'] && sample['sonar-analyse'] !== 'true' ? 'true' : 'false',
};
});
} catch (error) {
Expand Down

0 comments on commit 04d17d0

Please sign in to comment.