chore(deps): update dependency angular-eslint to v21 #283
This file contains hidden or 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: Build Visualization | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'visualization/**' | |
| - '.github/workflows/build-visualization.yml' | |
| pull_request: | |
| paths: | |
| - 'visualization/**' | |
| - '.github/workflows/build-visualization.yml' | |
| # Cancel in-progress runs on same PR | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| # Explicit permissions (principle of least privilege) | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| jobs: | |
| build: | |
| name: Build and Test | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| working-directory: visualization | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup mise | |
| uses: jdx/mise-action@v2 | |
| - name: Cache npm | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-npm-${{ hashFiles('visualization/package-lock.json') }} | |
| restore-keys: ${{ runner.os }}-npm- | |
| - name: Install dependencies | |
| run: mise run install-visualization-deps | |
| working-directory: . | |
| - name: Run linter | |
| run: mise run lint-visualization | |
| working-directory: . | |
| - name: Build application | |
| run: mise run build-visualization | |
| working-directory: . | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=4096 | |
| - name: Run unit tests | |
| run: mise run ci-test-visualization | |
| working-directory: . | |
| env: | |
| CHROME_BIN: /usr/bin/google-chrome | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage-${{ github.run_id }} | |
| path: visualization/coverage | |
| retention-days: 1 | |
| if-no-files-found: error | |
| - name: Determine version | |
| id: version | |
| run: | | |
| if [ "${{ github.ref_type }}" == "tag" ]; then | |
| echo "release=${{ github.ref_name }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "release=${{ github.sha }}" >> $GITHUB_OUTPUT | |
| fi | |
| working-directory: . | |
| - name: Create version file | |
| run: mise run ci-create-version ${{ steps.version.outputs.release }} | |
| working-directory: . | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: visualization-build-${{ github.run_id }} | |
| path: visualization/dist | |
| retention-days: 1 | |
| if-no-files-found: error | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: visualization-test-results-${{ github.run_id }} | |
| path: visualization/test-results | |
| retention-days: 1 | |
| if-no-files-found: warn | |
| - name: Publish test results | |
| uses: dorny/test-reporter@v1 | |
| if: always() && github.event.pull_request.head.repo.full_name == github.repository | |
| with: | |
| name: Visualization Unit Tests | |
| path: visualization/test-results/*.xml | |
| reporter: java-junit | |
| fail-on-error: false | |
| integration-tests: | |
| name: Integration Tests | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| needs: build | |
| defaults: | |
| run: | |
| working-directory: visualization | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup mise | |
| uses: jdx/mise-action@v2 | |
| - name: Cache npm | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-npm-${{ hashFiles('visualization/package-lock.json') }} | |
| restore-keys: ${{ runner.os }}-npm- | |
| - name: Install dependencies | |
| run: mise run install-visualization-deps | |
| working-directory: . | |
| - name: Install http-server and wait-on | |
| run: npm install -g http-server wait-on | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: visualization-build-${{ github.run_id }} | |
| path: visualization/dist | |
| - name: Start server and run Cypress tests | |
| run: | | |
| http-server visualization/dist/visualization/browser -p 4200 & | |
| SERVER_PID=$! | |
| wait-on http://localhost:4200 --timeout 30000 | |
| mise run ci-e2e | |
| TEST_EXIT=$? | |
| kill $SERVER_PID || true | |
| exit $TEST_EXIT | |
| working-directory: . | |
| - name: Upload Cypress screenshots on failure | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: cypress-screenshots-${{ github.run_id }} | |
| path: visualization/cypress/screenshots | |
| retention-days: 7 | |
| if-no-files-found: ignore | |
| - name: Upload Cypress videos on failure | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: cypress-videos-${{ github.run_id }} | |
| path: visualization/cypress/videos | |
| retention-days: 7 | |
| if-no-files-found: ignore | |
| sonarcloud: | |
| name: SonarCloud Analysis | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| needs: build | |
| if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # Shallow clones should be disabled for better analysis relevancy | |
| - name: Download coverage artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: coverage-${{ github.run_id }} | |
| path: visualization/coverage | |
| - name: SonarCloud Scan | |
| uses: SonarSource/sonarcloud-github-action@v5.0.0 | |
| with: | |
| projectBaseDir: visualization | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_VISUALIZATION }} |