-
Notifications
You must be signed in to change notification settings - Fork 251
48 lines (42 loc) · 1.29 KB
/
pr-diff.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: "PR diff bot"
on: [pull_request]
jobs:
build:
name: PR diff bot
runs-on: ubuntu-latest
steps:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Checkout base branch
uses: actions/checkout@v1
with:
ref: ${{ github.base_ref }}
- name: Record before stats
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: |
mkdir .diff
npm ci
npx lerna bootstrap
npm run build
cat packages/browser/dist/bugsnag.min.js | wc -c > .diff/size-before-minified
cat packages/browser/dist/bugsnag.min.js | gzip | wc -c > .diff/size-before-gzipped
- name: Checkout PR branch
uses: actions/checkout@v1
with:
clean: false
- name: Record after stats
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: |
npm ci
npx lerna bootstrap
npm run build
cat packages/browser/dist/bugsnag.min.js | wc -c > .diff/size-after-minified
cat packages/browser/dist/bugsnag.min.js | gzip | wc -c > .diff/size-after-gzipped
- name: Run danger
uses: danger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}