chore: lock product to avoid deadlocks #529
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: Check frontend | |
| on: [push, pull_request] | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| code_quality: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 24 | |
| - name: Install dependencies | |
| working-directory: ./frontend | |
| run: | | |
| npm ci | |
| - name: Prettier | |
| working-directory: ./frontend | |
| run: | | |
| npx prettier -c src | |
| - name: ESLint | |
| working-directory: ./frontend | |
| run: | | |
| npx eslint src | |
| end_to_end_tests: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| cache-dependency-path: end_to_end_tests/package-lock.json | |
| - name: Install dependencies | |
| working-directory: ./end_to_end_tests | |
| run: | | |
| npm ci | |
| - name: Build images | |
| run: | | |
| docker compose -f docker-compose-playwright.yml build | |
| - name: End-to-end tests | |
| run: | | |
| docker compose -f docker-compose-playwright.yml up --no-build --abort-on-container-exit --exit-code-from playwright | |
| - name: Upload Playwright report | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: playwright-report | |
| path: | | |
| end_to_end_tests/playwright-report/ | |
| end_to_end_tests/test-results/ | |
| retention-days: 7 | |
| check_code_sonarqube_frontend: | |
| permissions: | |
| contents: read | |
| if: >- | |
| github.repository == 'SecObserve/SecObserve' && | |
| (github.ref == 'refs/heads/dev' || | |
| (github.event_name == 'pull_request' && | |
| github.event.pull_request.head.repo.full_name == github.repository)) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - | |
| name: Run SonarQube scan for frontend | |
| uses: SonarSource/sonarqube-scan-action@ba9859eae8dd6bd29e412f25ddbbef3d032000f4 # v8 | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_FRONTEND }} | |
| with: | |
| projectBaseDir: frontend |