[main] Fix npm audit #847
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
| # SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | |
| # SPDX-License-Identifier: MIT | |
| name: Cypress Component Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| - stable* | |
| concurrency: | |
| group: cypress-component-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| APP_NAME: tables | |
| jobs: | |
| component-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [20] | |
| steps: | |
| - name: Checkout app | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| cache-dependency-path: package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build app | |
| run: npm run build --if-present | |
| - name: Run component tests | |
| run: npm run tests:component | |
| - name: Upload test failure screenshots | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: cypress-component-screenshots-node${{ matrix.node-version }} | |
| path: cypress/screenshots/ | |
| retention-days: 5 | |
| - name: Upload test videos | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: cypress-component-videos-node${{ matrix.node-version }} | |
| path: cypress/videos/ | |
| retention-days: 5 | |
| summary: | |
| permissions: | |
| contents: none | |
| runs-on: ubuntu-latest-low | |
| needs: component-tests | |
| if: always() | |
| name: cypress-component-summary | |
| steps: | |
| - name: Summary status | |
| run: if ${{ needs.component-tests.result != 'success' && needs.component-tests.result != 'skipped' }}; then exit 1; fi |