Merge remote-tracking branch 'origin/staging' into development #14140
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: Component testing | |
| on: | |
| push: | |
| branches: | |
| - development | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| precheck: | |
| uses: ./.github/workflows/precheck.yml | |
| secrets: inherit | |
| with: | |
| is_pr: ${{ github.event_name == 'pull_request' }} | |
| pr_number: ${{ github.event.pull_request.number }} | |
| is_draft: ${{ github.event.pull_request.draft }} | |
| pr_title: ${{ github.event.pull_request.title }} | |
| pr_body: ${{ github.event.pull_request.body }} | |
| head_sha: ${{ github.event.pull_request.head.sha }} | |
| ref: ${{ github.ref }} | |
| branch: ${{ github.ref_name }} | |
| event_name: ${{ github.event_name }} | |
| is_protected_push: ${{ github.ref_name == 'development' || github.ref_name == 'production' }} | |
| sha: ${{ github.sha }} | |
| cypress-run: | |
| name: Component testing | |
| needs: precheck | |
| if: needs.precheck.outputs.should_run == 'true' | |
| runs-on: ubuntu-24.04 | |
| env: | |
| CYPRESS_RETRIES: 2 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # Install NPM dependencies, cache them correctly | |
| # and run all Cypress tests | |
| - name: Setup Nodejs | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Cache node modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./node_modules | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| - name: install dependencies | |
| run: yarn install | |
| - name: Get Cypress version | |
| id: cypress-version | |
| run: | | |
| echo "version=$(yarn info cypress version --silent | head -n 1)" >> $GITHUB_OUTPUT | |
| - name: Get Cypress from cache | |
| id: cypress-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/Cypress | |
| key: ${{ runner.os }}-cypress-${{ steps.cypress-version.outputs.version }} | |
| - name: Install Cypress | |
| if: steps.cypress-cache.outputs.cache-hit != 'true' | |
| run: npx cypress install | |
| - name: generate global css | |
| run: yarn tailwind | |
| - name: Cypress run | |
| uses: cypress-io/github-action@v6 | |
| with: | |
| browser: chrome | |
| component: true | |
| config-file: cypress.config.ts | |
| headed: false | |
| timeout-minutes: 15 |