feat: Fake scheduling improvement #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Scheduling Benchmarking" | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- 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: install toolchain | |
shell: bash | |
run: | | |
make toolchain | |
- name: run scheduling test | |
shell: bash | |
run: | | |
OUTPUT_DIR=$(mktemp -d) | |
export OUTPUT_DIR | |
echo OUTPUT_DIR="$OUTPUT_DIR" >> "$GITHUB_ENV" | |
cd pkg/controllers/provisioning/scheduling && go test -tags=test_performance -run=SchedulingProfile | |
- 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: '$GITHUB_OUTPUT' | |
}) | |
after: | |
permissions: | |
pull-requests: write | |
name: After PR | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: cd pkg/controllers/provisioning/scheduling && echo "after_results=$(go test -tags=test_performance -run=SchedulingProfile)" >> $GITHUB_ENV | |
- 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: "$GITHUB_OUTPUT" | |
}) |