From b965addabd75c035cdc110d5130f8084dffd0a9c Mon Sep 17 00:00:00 2001
From: Hubert Bugaj
Date: Tue, 13 Dec 2022 13:14:31 +0100
Subject: [PATCH] update master, notify pr
---
.github/workflows/ci.yml | 51 +++++++++++++-----------
.github/workflows/update-bundle-size.yml | 35 ++++++++++++++++
bundle-size | 2 +-
3 files changed, 64 insertions(+), 24 deletions(-)
create mode 100644 .github/workflows/update-bundle-size.yml
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0aa2d77ca2..82f342b2b8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -107,38 +107,43 @@ jobs:
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
with:
files: lcov.info
- # Check if the bundle size was committed and is up-to-date
+ # Lint shell scripts
+ shellcheck:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Run shellcheck
+ uses: ludeeus/action-shellcheck@1.1.0
bundle-size:
runs-on: ubuntu-latest
steps:
- name: Checking out
- uses: actions/checkout@v2
- with:
- ref: ${{ github.head_ref }}
- fetch-depth: 0
+ uses: actions/checkout@v3
- name: Install Rust toolchain
uses: ./.github/actions/rust-cargo-run
with:
command: version
github_token: ${{ secrets.GITHUB_TOKEN }}
save_cache: true
- - name: Update bundle size
+ - name: Show bundle delta summary
+ id: bundle-summary
run: |
- git config --local user.email "github-actions[bot]@users.noreply.github.com"
- git config --local user.name "github-actions[bot]"
- make bundle-size
- git add bundle-size
- git commit -m "[skip ci] update bundle-size" || true
- - name: Push changes
- uses: ad-m/github-push-action@master
+ echo "summary=$(make bundle-size | tail -n3)" >> $$GITHUB_OUTPUT
+ - name: Find Comment
+ uses: peter-evans/find-comment@v2
+ id: fc
with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- branch: ${{ github.head_ref }}
- # Lint shell scripts
- shellcheck:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Run shellcheck
- uses: ludeeus/action-shellcheck@1.1.0
+ issue-number: ${{ github.event.pull_request.number }}
+ comment-author: 'github-actions[bot]'
+ body-includes: "### WASM bundle size"
+
+ - name: Create or update comment
+ uses: peter-evans/create-or-update-comment@v2
+ with:
+ comment-id: ${{ steps.fc.outputs.comment-id }}
+ issue-number: ${{ github.event.pull_request.number }}
+ body: |
+ ### WASM bundle size
+ ${{ steps.bundle-summary.outputs.summary }}
+ edit-mode: replace
diff --git a/.github/workflows/update-bundle-size.yml b/.github/workflows/update-bundle-size.yml
new file mode 100644
index 0000000000..cd94d5c971
--- /dev/null
+++ b/.github/workflows/update-bundle-size.yml
@@ -0,0 +1,35 @@
+name: Update WASM bundle size
+
+on:
+ push:
+ branches:
+ - master
+
+# Check if the bundle size was committed and is up-to-date
+jobs:
+ bundle-size:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checking out
+ uses: actions/checkout@v3
+ with:
+ ref: ${{ github.head_ref }}
+ fetch-depth: 0
+ - name: Install Rust toolchain
+ uses: ./.github/actions/rust-cargo-run
+ with:
+ command: version
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ save_cache: true
+ - name: Update bundle size
+ run: |
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
+ git config --local user.name "github-actions[bot]"
+ make bundle-size
+ git add bundle-size
+ git commit -m "[skip ci] update bundle-size" || true
+ - name: Push changes
+ uses: ad-m/github-push-action@master
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ branch: ${{ github.head_ref }}
diff --git a/bundle-size b/bundle-size
index 2cab2b059d..97f0dd0bcd 100644
--- a/bundle-size
+++ b/bundle-size
@@ -1 +1 @@
-6030520
+6033977