-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Migrate bundle size bot from Travis to GitHub actions
- Loading branch information
1 parent
87c3946
commit 8c23e16
Showing
2 changed files
with
45 additions
and
22 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: "PR size bot" | ||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
name: PR size bot | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Checkout PR branch | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Record PR size | ||
run: | | ||
mkdir .size | ||
npx lerna bootstrap --ignore @bugsnag/expo --ignore @bugsnag/react-native | ||
npx lerna run build --scope @bugsnag/browser | ||
cat packages/browser/dist/bugsnag.min.js | wc -c > .size/after-minified | ||
cat packages/browser/dist/bugsnag.min.js | gzip | wc -c > .size/after-gzipped | ||
- name: Checkout base branch | ||
uses: actions/checkout@v1 | ||
with: | ||
ref: ${{ github.base_ref }} | ||
clean: false | ||
|
||
- name: Record target branch size | ||
run: | | ||
npm ci | ||
npx lerna bootstrap --ignore @bugsnag/expo --ignore @bugsnag/react-native | ||
npx lerna run build --scope @bugsnag/browser | ||
cat packages/browser/dist/bugsnag.min.js | wc -c > .size/before-minified | ||
cat packages/browser/dist/bugsnag.min.js | gzip | wc -c > .size/before-gzipped | ||
- name: Run danger | ||
uses: danger/danger-js@9.1.6 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.