name: 'lighthouse test'

on:
  pull_request:
    branches: [ main, release, milestone**, feat/a11y-aria ]
  push:
    branches: [ main, release, milestone** ]

jobs:
  lhci:
    name: Lighthouse
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js 14.x
        uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - name: npm install, build
        run: |
          npm i -g lerna gulp
          lerna bootstrap
          lerna run build:lib
          npm run build-storybook
      - name: run Lighthouse CI
        env:
          LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
        run: |
          npm install -g @lhci/cli@0.8.x
          lhci autorun
