name: Set up and build project inputs: skip-build: description: Skip the build step required: false default: 'false' skip-build-cache: description: Skip the build cache step required: false default: 'false' runs: using: composite steps: - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: 22 check-latest: true - name: Enable Corepack shell: bash run: corepack enable - name: Get Yarn configuration id: yarn-config shell: bash run: | echo "cache-folder=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT # TODO: This can be simplified to use the `cache` option of the `actions/setup-node` action when it supports Corepack. # See: https://github.com/actions/setup-node/issues/531 - uses: actions/cache@v4 name: Setup Yarn cache with: # Also cache Cypress binary. path: | ~/.cache/Cypress ${{ steps.yarn-config.outputs.cache-folder }} key: ${{ runner.os }}-yarn-cache-${{ hashFiles('yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn-cache- - name: Install dependencies shell: bash run: yarn install --immutable - name: Run build if: inputs.skip-build != 'true' shell: bash run: yarn build && yarn build:umd env: # Disable V8 compile cache to hard crashes in Node.js. This can likely be removed once upgraded to the next LTS version (version 22). # See: https://github.com/nodejs/node/issues/51555 DISABLE_V8_COMPILE_CACHE: 1