Build on branch bugfix/MARP-1118-Reloading-of-webpage-caused-a-flickering triggered by ntqdinh-axonivy #1015
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
name: UI CI Build | |
run-name: Build on branch ${{github.ref_name}} triggered by ${{github.actor}} | |
on: | |
push: | |
paths: | |
- 'marketplace-ui/**' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
cache-dependency-path: ./marketplace-ui/package-lock.json | |
- name: Install Dependencies | |
run: | | |
cd ./marketplace-ui | |
npm install | |
- name: Build project | |
run: | | |
cd ./marketplace-ui | |
npm run build | |
analysis: | |
name: Sonarqube | |
needs: build | |
runs-on: self-hosted | |
env: | |
SONAR_PROJECT_KEY: 'AxonIvy-Market-UI' | |
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
steps: | |
- name: Execute Tests | |
run: | | |
cd ./marketplace-ui | |
npm run test | |
- uses: sonarsource/sonarqube-scan-action@master | |
env: | |
SONAR_TOKEN: ${{ env.SONAR_TOKEN }} | |
SONAR_HOST_URL: ${{ env.SONAR_HOST_URL }} | |
with: | |
projectBaseDir: ./marketplace-ui | |
args: | |
-Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} | |
-Dsonar.javascript.lcov.reportPaths=${{ github.workspace }}/marketplace-ui/coverage/lcov.info | |
- name: SonarQube Quality Gate check | |
id: sonarqube-quality-gate-check | |
uses: sonarsource/sonarqube-quality-gate-action@master | |
with: | |
scanMetadataReportFile: ${{ github.workspace }}/marketplace-ui/.scannerwork/report-task.txt | |
timeout-minutes: 5 | |
env: | |
SONAR_TOKEN: ${{ env.SONAR_TOKEN }} | |
SONAR_HOST_URL: ${{ env.SONAR_HOST_URL }} | |
clean-up: | |
name: Remove unused docker images | |
needs: analysis | |
runs-on: self-hosted | |
steps: | |
- name: Remove unused sonar images | |
run: docker image prune -af |