name: PerformanceCheck

on:
  pull_request:
    branches:
      - master

jobs:
  master-krausest-comparison:
    strategy:
      fail-fast: false
    name: Glimmer Krausest Benchmark
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 2
      - uses: volta-cli/action@v1
      - name: Build Control
        run: |
          git checkout ${{ github.event.pull_request.base.sha }}
          yarn install --frozen-lockfile
          yarn ember build --env production --suppress-sizes --output-path control-dist
      - name: Build Experiment
        run: |
          git checkout ${{ github.sha }}
          yarn install --frozen-lockfile
          yarn ember build --env production --suppress-sizes --output-path dist
      - name: Run Analysis
        timeout-minutes: 10
        uses: tracerbench/tracerbench-compare-action@master
        with:
          build-control: false
          build-experiment: false
          control-serve-command: yarn benchmark:control
          experiment-serve-command: yarn benchmark:experiment
          control-url: http://localhost:3000/krausest/
          experiment-url: http://localhost:3001/krausest/
          regression-threshold: 25
          fidelity: high
          markers: 'navigationStart,renderStart,renderEnd'
          clean-after-analyze: false
      - name: Upload Tracerbench Artifacts
        if: failure() || success()
        uses: actions/upload-artifact@v1
        with:
          name: Trace Artifacts
          path: tracerbench-results

name: PerformanceCheck

on:
  pull_request:
    branches:
      - master

jobs:
  master-krausest-comparison:
    strategy:
      fail-fast: false
    name: Glimmer Krausest Benchmark
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - uses: volta-cli/action@v1
      - name: Build Control
        run: |
          git checkout ${{ github.event.pull_request.base.sha }}
          yarn install --frozen-lockfile
          yarn ember build --env production --suppress-sizes --output-path control-dist
      - name: Build Experiment
        run: |
          git checkout ${{ github.sha }}
          yarn install --frozen-lockfile
          yarn ember build --env production --suppress-sizes --output-path dist
      - name: Run Analysis
        timeout-minutes: 10
        uses: tracerbench/tracerbench-compare-action@master
        with:
          build-control: false
          build-experiment: false
          control-serve-command: yarn benchmark:control
          experiment-serve-command: yarn benchmark:experiment
          control-url: http://localhost:3000/krausest/
          experiment-url: http://localhost:3001/krausest/
          regression-threshold: 25
          fidelity: high
          markers: 'navigationStart,renderStart,renderEnd'
          clean-after-analyze: false
      - name: Upload Tracerbench Artifacts
        if: failure() || success()
        uses: actions/upload-artifact@v1
        with:
          name: Trace Artifacts
          path: tracerbench-results

Update PerformanceCheck CI run to fetch full git history.
Update PerformanceCheck CI run to fetch full git history.

Currently (with a `fetch-depth` of 2) a PR that has multiple commits
will not retrieve the commit referenced by `${{
github.event.pull_request.base.sha }}`.

This changes the checkout action configuration to fetch the full
history, and avoids the issue.
