-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
/.github/workflows: enable nightly correctness, add latency on pull c…
…omment
- Loading branch information
1 parent
1fd9f1c
commit b685bcd
Showing
2 changed files
with
69 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,8 @@ jobs: | |
token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
event-type: benchmark-latency | ||
client-payload: '{"from_server": "postgres", "from_version": "15.5", "to_server": "doltgres", "to_version": "${{ github.sha }}", "mode": "nightly", "actor": "${{ github.actor }}", "template_script": "./.github/scripts/performance-benchmarking/get-postgres-doltgres-job-json.sh"}' | ||
# - uses: peter-evans/[email protected] | ||
# with: | ||
# token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
# event-type: sql-correctness | ||
# client-payload: '{"version": "${{ github.sha }}", "mode": "nightly", "actor": "${{ github.actor }}", "template_script": "./.github/scripts/sql-correctness/get-dolt-correctness-job-json.sh"}' | ||
- uses: peter-evans/[email protected] | ||
with: | ||
token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
event-type: sql-correctness | ||
client-payload: '{"version": "${{ github.sha }}", "mode": "nightly", "actor": "${{ github.actor }}", "template_script": "./.github/scripts/sql-correctness/get-doltgres-correctness-job-json.sh"}' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Benchmark Pull Requests | ||
|
||
on: | ||
pull_request: | ||
types: [ opened ] | ||
issue_comment: | ||
types: [ created ] | ||
|
||
jobs: | ||
validate-commentor: | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
valid: ${{ steps.set_valid.outputs.valid }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Validate Commentor | ||
id: set_valid | ||
run: ./.github/scripts/performance-benchmarking/validate-commentor.sh "$ACTOR" | ||
env: | ||
ACTOR: ${{ github.actor }} | ||
|
||
check-comments: | ||
runs-on: ubuntu-22.04 | ||
needs: validate-commentor | ||
if: ${{ needs.validate-commentor.outputs.valid == 'true' }} | ||
outputs: | ||
benchmark: ${{ steps.set_benchmark.outputs.benchmark }} | ||
comment-body: ${{ steps.set_body.outputs.body }} | ||
steps: | ||
- name: Check for Deploy Trigger | ||
uses: dolthub/pull-request-comment-trigger@master | ||
id: check | ||
with: | ||
trigger: '#benchmark' | ||
reaction: rocket | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set Benchmark | ||
if: ${{ steps.check.outputs.triggered == 'true' }} | ||
id: set_benchmark | ||
run: | | ||
echo "benchmark=true" >> $GITHUB_OUTPUT | ||
performance: | ||
runs-on: ubuntu-22.04 | ||
needs: [validate-commentor, check-comments] | ||
if: ${{ needs.check-comments.outputs.benchmark == 'true' }} | ||
name: Trigger Benchmark Latency K8s Workflow | ||
steps: | ||
- uses: dolthub/pull-request-comment-branch@v3 | ||
id: comment-branch | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Get pull number | ||
uses: actions/github-script@v6 | ||
id: get_pull_number | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: core.setOutput("pull_number", JSON.stringify(context.issue.number)); | ||
- uses: peter-evans/[email protected] | ||
with: | ||
token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
event-type: benchmark-latency | ||
client-payload: '{"from_server": "doltgres", "from_version": "${{ github.sha }}", "to_server": "doltgres", "to_version": "${{ steps.comment-branch.outputs.head_sha }}", "mode": "pullRequest", "issue_number": "${{ steps.get_pull_number.outputs.pull_number }}", "init_big_repo": "true", "actor": "${{ github.actor }}", "template_script": "./.github/scripts/performance-benchmarking/get-doltgres-doltgres-job-json.sh"}' |