20661 fe implement multivariate layers with bivariate style #1235
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: Size Report | |
env: | |
HUSKY: 0 | |
on: | |
pull_request: | |
paths-ignore: | |
- 'e2e/**' | |
- 'playwright.config.ts' | |
- '.github/workflows/run_e2e_tests.yml' | |
jobs: | |
build-base: | |
name: Build base | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.base_ref }} | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm i --prod=false | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.TOKEN_REPO}} | |
- name: Build | |
run: pnpm run build | |
- name: Upload base size-report.json | |
uses: actions/upload-artifact@v4 | |
with: | |
name: base | |
path: ./size-report.json | |
retention-days: 1 | |
build-pr: | |
name: Build PR | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm i --prod=false | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.TOKEN_REPO}} | |
- name: Build | |
run: pnpm run build | |
- name: Upload base size-report.json | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pr | |
path: ./size-report.json | |
retention-days: 1 | |
report: | |
name: Generate report | |
runs-on: ubuntu-24.04 | |
needs: [build-base, build-pr] | |
steps: | |
- name: Checkout PR | |
uses: actions/checkout@v4 | |
- name: Download base size-report.json | |
uses: actions/download-artifact@v4 | |
with: | |
name: base | |
path: base | |
- name: Download PR size-report.json | |
uses: actions/download-artifact@v4 | |
with: | |
name: pr | |
path: pr | |
- name: Get diff | |
id: get-diff | |
uses: Konturio/bundle-size-diff@v1.0.6 | |
with: | |
base_path: './base/size-report.json' | |
pr_path: './pr/size-report.json' | |
- name: Comment | |
uses: NejcZdovc/comment-pr@v2.1.0 | |
with: | |
file: 'comment.md' | |
identifier: 'GITHUB_COMMENT_SIZE' | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
OLD: ${{steps.get-diff.outputs.base_file_string}} | |
NEW: ${{steps.get-diff.outputs.pr_file_string}} | |
DIFF: ${{steps.get-diff.outputs.diff_file_string}} | |
DIFF_PERCENT: ${{steps.get-diff.outputs.percent}} |