Merge pull request #530 from element-hq/renovate/compound-design-tokens #1807
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: Analysis | |
| on: | |
| pull_request: {} | |
| push: | |
| branches: [develop, main] | |
| jobs: | |
| lint: | |
| name: "Lint" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| - name: pnpm cache | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| cache: "pnpm" | |
| node-version-file: ".node-version" | |
| - name: Install dependencies | |
| run: "pnpm install --frozen-lockfile --ignore-scripts" | |
| - name: Lint | |
| run: "pnpm lint" | |
| - name: Check formatting | |
| run: "pnpm prettier:check" | |
| test: | |
| name: "Unit test" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| - name: pnpm cache | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| cache: "pnpm" | |
| node-version-file: ".node-version" | |
| - name: Install dependencies | |
| run: "pnpm install --frozen-lockfile --ignore-scripts" | |
| - name: Test | |
| run: "pnpm test --coverage" | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: coverage | |
| path: | | |
| coverage | |
| !coverage/lcov-report | |
| - name: SonarCloud Scan | |
| uses: SonarSource/sonarcloud-github-action@ffc3010689be73b8e5ae0c57ce35968afd7909e8 # v5 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} | |
| e2e: | |
| name: "Test end-to-end" | |
| # This must be kept in sync with the version of ubuntu used in the Docker | |
| # image, in playwright/Dockerfile | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| - name: pnpm cache | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| cache: "pnpm" | |
| node-version-file: ".node-version" | |
| - name: Install dependencies | |
| run: "pnpm install --frozen-lockfile --ignore-scripts" | |
| - name: Build Storybook | |
| run: pnpm build-storybook | |
| - name: Get Playwright version | |
| run: echo "PLAYWRIGHT_VERSION=$(pnpm list @playwright/test --depth=0 --json | jq -r '.[0].devDependencies["@playwright/test"].version')" >> $GITHUB_ENV | |
| - name: Cache Playwright binaries | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6 | |
| id: playwright-cache | |
| with: | |
| path: | | |
| ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} | |
| - name: Install Playwright binaries | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: pnpm playwright install --with-deps | |
| - name: Run Playwright tests | |
| # We use this action to get a virtual frame buffer for the browsers | |
| uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 # v1 | |
| with: | |
| run: pnpm playwright test -j 100% | |
| - name: Upload Playwright report | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: html-report--attempt-${{ github.run_attempt }} | |
| path: playwright-report | |
| retention-days: 14 |