chore: remove @types/react-redux dependency (#3908)
#13093
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: Main workflow | |
| # The event triggers are configured as following: | |
| # - on branch main, trigger the workflow on every push | |
| # - on any pull request, trigger the workflow | |
| # This is to avoid running the workflow twice on pull requests. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| lint_and_test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| # https://github.com/bahmutov/cypress-gh-action-split-install/blob/ca3916d4e7240ebdc337825d2d78eb354855464b/.github/workflows/tests.yml#L8-L11 | |
| env: | |
| # prevents extra Cypress installation progress messages | |
| CI: 1 | |
| # avoid warnings like "tput: No value for $TERM and no -T specified" | |
| TERM: xterm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| # We need to fetch the full history to get the correct coverage data. | |
| fetch-depth: 2 | |
| - name: Installing dependencies and building packages | |
| uses: ./.github/actions/ci | |
| - name: Running static type checking | |
| run: pnpm typecheck | |
| - name: Running static type checking (Cypress) | |
| run: pnpm typecheck:cypress | |
| - name: Running static type checking (Starter Template) | |
| run: pnpm typecheck:starters | |
| - name: Running linters | |
| run: pnpm jest --projects jest.{eslint,stylelint}.config.js --reporters jest-silent-reporter | |
| env: | |
| CI: true | |
| - name: Running tests for frontend packages and generating coverage files | |
| run: pnpm run test --reporters jest-silent-reporter --coverage --coverageDirectory=./coverage/jest | |
| env: | |
| CI: true | |
| RTL_ASYNC_UTIL_TIMEOUT: 5000 | |
| - name: Upload Jest coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage/jest/lcov.info | |
| name: jest-coverage | |
| - name: Running tests for node packages | |
| run: pnpm run test:node | |
| env: | |
| CI: true | |
| test_visual: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Installing dependencies and building packages | |
| uses: ./.github/actions/ci | |
| - name: Building Visual Regression Tests application for UI components | |
| run: pnpm visual-testing-app:build | |
| # Explicitly install the Chrome binary in case it's not available yet. | |
| # This workaround is based on the suggestions from https://github.com/puppeteer/puppeteer/issues/9533. | |
| - name: Installing Chrome via Puppeteer | |
| run: pnpm -C node_modules/puppeteer run postinstall | |
| env: | |
| PUPPETEER_DOWNLOAD_BASE_URL: https://storage.googleapis.com/chrome-for-testing-public | |
| - name: Running Visual Regression Tests for UI components | |
| run: pnpm vrt:components | |
| env: | |
| PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_UI_COMPONENTS }} | |
| test_custom_app_starter_js_template: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| # https://github.com/bahmutov/cypress-gh-action-split-install/blob/ca3916d4e7240ebdc337825d2d78eb354855464b/.github/workflows/tests.yml#L8-L11 | |
| env: | |
| # prevents extra Cypress installation progress messages | |
| CI: 1 | |
| # avoid warnings like "tput: No value for $TERM and no -T specified" | |
| TERM: xterm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Test Custom Application javascript starter template | |
| uses: ./.github/actions/test-template-action | |
| with: | |
| application-type: custom-application | |
| template-name: starter | |
| e2e-tests-command: test:e2e:template-custom-application-starter | |
| host-gcp-staging: ${{ secrets.HOST_GCP_STAGING }} | |
| playground-application-id: ${{ secrets.APP_ID_PLAYGROUND }} | |
| mc-api-url: ${{ secrets.MC_API_URL }} | |
| cypress-login-user: ${{ secrets.CYPRESS_LOGIN_USER }} | |
| cypress-login-password: ${{ secrets.CYPRESS_LOGIN_PASSWORD }} | |
| cypress-project-key: ${{ secrets.CYPRESS_PROJECT_KEY }} | |
| test_custom_app_starter_js_template_installation: | |
| runs-on: ubuntu-latest | |
| if: github.ref != 'refs/heads/main' && github.head_ref != 'changeset-release/main' | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Installing dependencies and building packages | |
| uses: ./.github/actions/ci | |
| - name: Installing and building template starter | |
| run: node ./scripts/install-template.mjs | |
| env: | |
| APPLICATION_TYPE: custom-application | |
| TEMPLATE_NAME: starter | |
| CTP_INITIAL_PROJECT_KEY: ${{ secrets.CYPRESS_PROJECT_KEY }} | |
| test_custom_app_starter_ts_template: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| # https://github.com/bahmutov/cypress-gh-action-split-install/blob/ca3916d4e7240ebdc337825d2d78eb354855464b/.github/workflows/tests.yml#L8-L11 | |
| env: | |
| # prevents extra Cypress installation progress messages | |
| CI: 1 | |
| # avoid warnings like "tput: No value for $TERM and no -T specified" | |
| TERM: xterm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Test Custom Application typescript starter template | |
| uses: ./.github/actions/test-template-action | |
| with: | |
| application-type: custom-application | |
| template-name: starter-typescript | |
| e2e-tests-command: test:e2e:template-custom-application-starter | |
| typecheck-command: typecheck:starter:custom-applications | |
| host-gcp-staging: ${{ secrets.HOST_GCP_STAGING }} | |
| playground-application-id: ${{ secrets.APP_ID_PLAYGROUND }} | |
| mc-api-url: ${{ secrets.MC_API_URL }} | |
| cypress-login-user: ${{ secrets.CYPRESS_LOGIN_USER }} | |
| cypress-login-password: ${{ secrets.CYPRESS_LOGIN_PASSWORD }} | |
| cypress-project-key: ${{ secrets.CYPRESS_PROJECT_KEY }} | |
| test_custom_app_starter_ts_template_installation: | |
| runs-on: ubuntu-latest | |
| if: github.ref != 'refs/heads/main' && github.head_ref != 'changeset-release/main' | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Installing dependencies and building packages | |
| uses: ./.github/actions/ci | |
| - name: Installing and building template starter | |
| run: node ./scripts/install-template.mjs | |
| env: | |
| APPLICATION_TYPE: custom-application | |
| TEMPLATE_NAME: starter-typescript | |
| CTP_INITIAL_PROJECT_KEY: ${{ secrets.CYPRESS_PROJECT_KEY }} | |
| test_custom_view_starter_js_template: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| # https://github.com/bahmutov/cypress-gh-action-split-install/blob/ca3916d4e7240ebdc337825d2d78eb354855464b/.github/workflows/tests.yml#L8-L11 | |
| env: | |
| # prevents extra Cypress installation progress messages | |
| CI: 1 | |
| # avoid warnings like "tput: No value for $TERM and no -T specified" | |
| TERM: xterm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Test Custom View javascript starter template | |
| uses: ./.github/actions/test-template-action | |
| with: | |
| application-type: custom-view | |
| template-name: starter | |
| e2e-tests-command: test:e2e:template-custom-view-starter | |
| host-gcp-staging: ${{ secrets.HOST_GCP_STAGING }} | |
| playground-application-id: ${{ secrets.APP_ID_PLAYGROUND }} | |
| mc-api-url: ${{ secrets.MC_API_URL }} | |
| cypress-login-user: ${{ secrets.CYPRESS_LOGIN_USER }} | |
| cypress-login-password: ${{ secrets.CYPRESS_LOGIN_PASSWORD }} | |
| cypress-project-key: ${{ secrets.CYPRESS_PROJECT_KEY }} | |
| cypress-package-name: '@commercetools-applications/merchant-center-custom-view-template-starter' | |
| test_custom_view_starter_js_template_installation: | |
| runs-on: ubuntu-latest | |
| if: github.ref != 'refs/heads/main' && github.head_ref != 'changeset-release/main' | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Installing dependencies and building packages | |
| uses: ./.github/actions/ci | |
| - name: Installing and building template starter | |
| run: node ./scripts/install-template.mjs | |
| env: | |
| APPLICATION_TYPE: custom-view | |
| TEMPLATE_NAME: starter | |
| CTP_INITIAL_PROJECT_KEY: ${{ secrets.CYPRESS_PROJECT_KEY }} | |
| test_custom_view_starter_ts_template: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| # https://github.com/bahmutov/cypress-gh-action-split-install/blob/ca3916d4e7240ebdc337825d2d78eb354855464b/.github/workflows/tests.yml#L8-L11 | |
| env: | |
| # prevents extra Cypress installation progress messages | |
| CI: 1 | |
| # avoid warnings like "tput: No value for $TERM and no -T specified" | |
| TERM: xterm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Test Custom View typescript starter template | |
| uses: ./.github/actions/test-template-action | |
| with: | |
| application-type: custom-view | |
| template-name: starter-typescript | |
| e2e-tests-command: test:e2e:template-custom-view-starter | |
| typecheck-command: typecheck:starter:custom-views | |
| host-gcp-staging: ${{ secrets.HOST_GCP_STAGING }} | |
| playground-application-id: ${{ secrets.APP_ID_PLAYGROUND }} | |
| mc-api-url: ${{ secrets.MC_API_URL }} | |
| cypress-login-user: ${{ secrets.CYPRESS_LOGIN_USER }} | |
| cypress-login-password: ${{ secrets.CYPRESS_LOGIN_PASSWORD }} | |
| cypress-project-key: ${{ secrets.CYPRESS_PROJECT_KEY }} | |
| cypress-package-name: '@commercetools-applications/merchant-center-custom-view-template-starter-typescript' | |
| test_custom_view_starter_ts_template_installation: | |
| runs-on: ubuntu-latest | |
| if: github.ref != 'refs/heads/main' && github.head_ref != 'changeset-release/main' | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Installing dependencies and building packages | |
| uses: ./.github/actions/ci | |
| - name: Installing and building template starter | |
| run: node ./scripts/install-template.mjs | |
| env: | |
| APPLICATION_TYPE: custom-view | |
| TEMPLATE_NAME: starter-typescript | |
| CTP_INITIAL_PROJECT_KEY: ${{ secrets.CYPRESS_PROJECT_KEY }} | |
| test_playground: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| # https://github.com/bahmutov/cypress-gh-action-split-install/blob/ca3916d4e7240ebdc337825d2d78eb354855464b/.github/workflows/tests.yml#L8-L11 | |
| env: | |
| # prevents extra Cypress installation progress messages | |
| CI: 1 | |
| # avoid warnings like "tput: No value for $TERM and no -T specified" | |
| TERM: xterm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| # We need to fetch the full history to get the correct coverage data. | |
| fetch-depth: 2 | |
| - name: Installing dependencies and building packages | |
| uses: ./.github/actions/ci | |
| - name: Building Playground application | |
| run: pnpm playground:build | |
| env: | |
| CYPRESS_COVERAGE: 'true' | |
| NODE_OPTIONS: '--max-old-space-size=6144' | |
| APP_ID: ${{ secrets.APP_ID_PLAYGROUND }} | |
| MC_API_URL: ${{ secrets.MC_API_URL }} | |
| CTP_INITIAL_PROJECT_KEY: ${{ secrets.CYPRESS_PROJECT_KEY }} | |
| HOST_GCP_STAGING: ${{ secrets.HOST_GCP_STAGING }} | |
| # https://github.com/bahmutov/cypress-gh-action-split-install/blob/ca3916d4e7240ebdc337825d2d78eb354855464b/.github/workflows/tests.yml#L23-L30 | |
| # https://github.com/marketplace/actions/cypress-io#custom-install | |
| - name: Restoring Cypress cache | |
| # restore / cache the binary ourselves on Linux | |
| # see https://github.com/actions/cache | |
| id: cache-cypress | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/Cypress | |
| key: ${{ runner.os }}-cypress-${{ hashFiles('**/package.json') }} | |
| - name: Installing Cypress binary | |
| run: pnpm cypress install && pnpm cypress cache list | |
| - name: Running End-to-End tests for Playground application | |
| run: | | |
| pnpm start-server-and-test 'pnpm playground:start:prod:local' http-get://127.0.0.1:3001 'pnpm percy exec -- pnpm test:e2e:playground' | |
| env: | |
| NODE_ENV: test | |
| CYPRESS_COVERAGE: 'true' | |
| PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_E2E_PLAYGROUND }} | |
| CYPRESS_CI: 'true' | |
| CYPRESS_LOGIN_USER: ${{ secrets.CYPRESS_LOGIN_USER }} | |
| CYPRESS_LOGIN_PASSWORD: ${{ secrets.CYPRESS_LOGIN_PASSWORD }} | |
| CYPRESS_PROJECT_KEY: ${{ secrets.CYPRESS_PROJECT_KEY }} | |
| HOST_GCP_STAGING: ${{ secrets.HOST_GCP_STAGING }} | |
| APP_ID: ${{ secrets.APP_ID_PLAYGROUND }} | |
| MC_API_URL: ${{ secrets.MC_API_URL }} | |
| CTP_INITIAL_PROJECT_KEY: ${{ secrets.CYPRESS_PROJECT_KEY }} | |
| - name: Move Cypress coverage files | |
| run: | | |
| mkdir -p ./coverage/cypress | |
| mv ./coverage/lcov.info ./coverage/cypress/lcov.info | |
| mv ./coverage/coverage-final.json ./coverage/cypress/coverage-final.json | |
| mv ./coverage/coverage-summary.json ./coverage/cypress/coverage-summary.json | |
| mv ./coverage/clover.xml ./coverage/cypress/clover.xml | |
| mv ./coverage/lcov-report ./coverage/cypress/lcov-report | |
| - name: Upload Cypress coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage/cypress/lcov.info | |
| name: cypress-coverage |