forked from kubernetes-sigs/karpenter
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (66 loc) · 1.88 KB
/
scheduling-benchmarking.yaml
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
name: "Scheduling Benchmarking"
on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
jobs:
before:
permissions:
pull-requests: write
name: Before PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Run Test
id: test-run-before
run: |
{
cd pkg/controllers/provisioning/scheduling
echo 'BEFORE_OUTPUT<<EOF'
go test -tags=test_performance -run=SchedulingProfile
echo EOF
} >> "$GITHUB_OUTPUT"
- uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: jobs.before.steps.test-run-before.outputs.BEFORE_OUTPUT
})
after:
permissions:
pull-requests: write
name: After PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Test
id: test-run-after
run: |
{
cd pkg/controllers/provisioning/scheduling
echo 'AFTER_OUTPUT<<EOF'
go test -tags=test_performance -run=SchedulingProfile
echo EOF
} >> "$GITHUB_OUTPUT"
- uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: jobs.before.steps.test-run-after.outputs.AFTER_OUTPUT
})