Skip to content

Commit

Permalink
ci: Migrate bundle size bot from Travis to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bengourley committed Dec 17, 2020
1 parent 87c3946 commit 8c23e16
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 22 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/pr-size.yml
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 }}
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

0 comments on commit 8c23e16

Please sign in to comment.