aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/bundlewatch.yml
blob: 2ca854509197c25796b7a637f56825d3b5d4f9a5 (plain) (blame)
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
name: "Bundlewatch Github Action"

on:
  push:
    branches:
    - develop
  pull_request:
    types: [synchronize, opened]

jobs:

  bundlewatch:
    runs-on: ubuntu-latest

    env:
      CI_BRANCH_BASE: develop

    steps:
      - uses: actions/checkout@v2

      - name: Use Node.js
        uses: actions/setup-node@v1
        with:
          node-version: '12.x'

      - name: Cache Node.js modules
        uses: actions/cache@v2
        with:
          path: |
            **/node_modules
            ~/fixtures
          key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.OS }}-node-
            ${{ runner.OS }}-

      - name: Install dependencies
        run: yarn install --frozen-lockfile

      - name: Angular bundlewatch
        uses: jackyef/bundlewatch-gh-action@master
        with:
          build-script: npm run build -- --analyze-bundle
          bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}