Skip to content

feat: Fake scheduling improvement #21

feat: Fake scheduling improvement

feat: Fake scheduling improvement #21

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
})