open-nomad/.github/workflows/ember-test-audit.yml
Buck Doyle 14e540cf46
Remove minor version from audit comparison action (#8048)
Making this less specific means we can benefit from updates
to the action without needing to change the workflow, such
as the bug fix in backspace/ember-test-audit-comparison-action@a87d252,
which addresses the incorrect duration delta here:
https://github.com/hashicorp/nomad/pull/7964#issuecomment-632351171
2020-05-26 15:34:12 -05:00

72 lines
2.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Ember test audit comparison
on:
pull_request:
paths:
- 'ui/**'
defaults:
run:
working-directory: ui
# Theres currently no way to share steps between jobs so theres a lot of duplication
# for running the audit for the base and PR.
jobs:
time-base:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.base.sha }}
- uses: nanasess/setup-chromedriver@master
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '10.x'
- run: yarn --frozen-lockfile
- run: mkdir -p /tmp/test-reports
- run: npx ember-test-audit 3 --json --output ../base-audit.json
- name: Upload result
uses: actions/upload-artifact@v2
with:
name: base-audit
path: base-audit.json
time-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nanasess/setup-chromedriver@master
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '10.x'
- run: yarn --frozen-lockfile
- run: mkdir -p /tmp/test-reports
- run: npx ember-test-audit 3 --json --output ../pr-audit.json
- name: Upload result
uses: actions/upload-artifact@v2
with:
name: pr-audit
path: pr-audit.json
compare:
needs: [time-base, time-pr]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: base-audit
- uses: actions/download-artifact@v2
with:
name: pr-audit
- uses: backspace/ember-test-audit-comparison-action@v1
with:
base-report-path: base-audit.json
comparison-report-path: pr-audit.json
base-identifier: ${{ github.event.pull_request.base.ref }}
comparison-identifier: ${{ github.event.pull_request.head.sha }}
output-path: audit-diff.md
- uses: marocchino/sticky-pull-request-comment@33a6cfb
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
path: audit-diff.md