-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
058ac8b
commit 2398954
Showing
3 changed files
with
66 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,38 +107,45 @@ 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/[email protected] | ||
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 'bundle-summary<<EOF' >> $GITHUB_ENV | ||
make bundle-size | tail -n3 >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- 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/[email protected] | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-regex: "^### 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.env.bundle-summary }} | ||
edit-mode: replace |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6030520 | ||
6033977 |