Merge pull request #9908 from GilbertCherrie/convert_dashboard_icons_… #2140
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: Cypress | |
| on: | |
| pull_request: | |
| push: | |
| branches-ignore: | |
| - dependabot/* | |
| - renovate/* | |
| schedule: | |
| - cron: 0 0 * * 0 | |
| workflow_dispatch: | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| cypress: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby-version: | |
| - '3.3' | |
| cypress-browser: | |
| - chrome | |
| - firefox | |
| - edge | |
| services: | |
| postgres: | |
| image: manageiq/postgresql:13 | |
| env: | |
| POSTGRESQL_USER: root | |
| POSTGRESQL_PASSWORD: smartvm | |
| POSTGRESQL_DATABASE: vmdb_development | |
| options: "--health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 5" | |
| ports: | |
| - 5432:5432 | |
| memcached: | |
| image: manageiq/memcached:1.6 | |
| ports: | |
| - 11211:11211 | |
| env: | |
| TEST_SUITE: spec:cypress | |
| CYPRESS: true | |
| CYPRESS_BROWSER: "${{ matrix.cypress-browser }}" | |
| RUN_CYPRESS: "${{ matrix.cypress-browser == 'chrome' || (matrix.cypress-browser != 'chrome' && github.event_name != 'pull_request') }}" | |
| PGHOST: localhost | |
| PGPASSWORD: smartvm | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Edge | |
| uses: browser-actions/setup-edge@v1 | |
| if: "${{ matrix.cypress-browser == 'edge' && env.RUN_CYPRESS == 'true' }}" | |
| - name: Set up system | |
| run: bin/before_install | |
| if: "${{ env.RUN_CYPRESS == 'true' }}" | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| if: "${{ env.RUN_CYPRESS == 'true' }}" | |
| with: | |
| ruby-version: "${{ matrix.ruby-version }}" | |
| bundler-cache: 'true' | |
| timeout-minutes: 30 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| if: "${{ env.RUN_CYPRESS == 'true' }}" | |
| with: | |
| node-version-file: package.json | |
| cache: yarn | |
| registry-url: https://npm.manageiq.org/ | |
| - name: Prepare tests | |
| run: bin/setup | |
| if: "${{ env.RUN_CYPRESS == 'true' }}" | |
| env: | |
| SKIP_TEST_RESET: 'true' | |
| SKIP_DATABASE_RESET: 'false' | |
| - name: Run tests | |
| run: bundle exec rake | |
| if: "${{ env.RUN_CYPRESS == 'true' }}" | |
| continue-on-error: "${{ matrix.cypress-browser != 'chrome' }}" | |
| - name: Save artifacts | |
| uses: actions/upload-artifact@v7 | |
| if: "${{ failure() && env.RUN_CYPRESS == 'true' }}" | |
| with: | |
| name: cypress-${{ matrix.cypress-browser }} | |
| path: | | |
| cypress/screenshots/ | |
| cypress/videos/ | |
| spec/manageiq/log/ |