2019-10-31 18:28:12 +01:00
|
|
|
name: Bundle size checks
|
2019-10-21 18:20:39 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'src/scripts/**'
|
|
|
|
- 'src/styles/**'
|
2019-10-22 23:20:40 +02:00
|
|
|
- 'package-lock.json'
|
|
|
|
- '.browserslistrc'
|
2019-10-21 18:20:39 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
measure:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 10
|
|
|
|
|
|
|
|
- name: Install dependencies and build
|
|
|
|
run: |
|
2019-10-31 18:28:12 +01:00
|
|
|
npm ci
|
|
|
|
npm run build
|
2019-10-21 18:20:39 +02:00
|
|
|
env:
|
|
|
|
CYPRESS_INSTALL_BINARY: 0
|
|
|
|
HUSKY_SKIP_INSTALL: true
|
|
|
|
|
2019-10-22 23:20:40 +02:00
|
|
|
# we don't need to build here, as even minized assets expected to be commited
|
|
|
|
|
2019-10-21 18:20:39 +02:00
|
|
|
- run: npx bundlesize
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
BUNDLESIZE_GITHUB_TOKEN: ${{secrets.BUNDLESIZE_GITHUB_TOKEN}}
|
|
|
|
CI_REPO_NAME: ${{ github.event.repository.name }}
|
|
|
|
CI_REPO_OWNER: ${{ github.event.organization.login }}
|
2019-10-22 23:20:40 +02:00
|
|
|
CI_COMMIT_SHA: ${{ github.event.after }}
|
|
|
|
GIT_COMMIT: ${{ github.event.after }}
|
2019-10-21 18:20:39 +02:00
|
|
|
CI_BRANCH: ${{ github.head_ref }}
|
|
|
|
FORCE_COLOR: 2
|