chore(deps): lock file maintenance #8604
This file contains 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: Pull Request | |
# Ensures that only one workflow per branch will run at a time. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
- 'beta' | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
env: | |
NODE_VERSION: 18 | |
CI: true | |
NUMBER_OF_RUNNERS: 8 | |
jobs: | |
linting: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout current commit | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Use pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: latest | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Setup pnpm cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
~/.cache/Cypress | |
key: pnpm-with-cypress-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: pnpm-with-cypress-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Generate icons | |
run: pnpm generate:icons && pnpm generate:componentsEnum | |
- name: Lint files | |
run: pnpm run lint | |
typecheck: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout current commit | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Use pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: latest | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Setup pnpm cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
~/.cache/Cypress | |
key: pnpm-with-cypress-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: pnpm-with-cypress-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Generate icons | |
run: pnpm generate:icons && pnpm generate:componentsEnum | |
- name: Typecheck files | |
run: pnpm typecheck | |
component-tests: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
containers: [0, 1, 2, 3, 4, 5, 6, 7] | |
steps: | |
- name: Checkout current commit | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Use pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: latest | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Setup pnpm cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
~/.cache/Cypress | |
key: pnpm-with-cypress-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: pnpm-with-cypress-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Install dependencies | |
if: steps.npm_cache.outputs.cache-hit != 'true' | |
run: pnpm install --frozen-lockfile | |
- name: Generate icons | |
run: pnpm generate:icons && pnpm generate:componentsEnum | |
- name: Component Tests | |
run: pnpm run test --spec $(node ./.github/lib/cypress-matrix.js ${{ env.NUMBER_OF_RUNNERS }} ${{ matrix.containers }}) |