forked from hashicorp/nomad
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (81 loc) · 2.57 KB
/
ember-test-audit.yml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Ember test audit comparison
on:
pull_request:
paths:
- 'ui/**'
defaults:
run:
working-directory: ui
# There’s currently no way to share steps between jobs so there’s 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@v2
with:
node-version: '14'
- 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@v2
with:
node-version: '14'
- 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@v2
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 }}
timing-output-path: audit-diff.md
flakiness-output-path: flakiness-report.md
- uses: marocchino/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
path: audit-diff.md
- name: Check for existence of flakiness report
id: check_file
uses: andstor/file-existence-action@v1
with:
files: "flakiness-report.md"
- name: comment PR
if: steps.check_file.outputs.files_exists == 'true'
uses: machine-learning-apps/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path: flakiness-report.md