Skip to content

Commit

Permalink
plan a
Browse files Browse the repository at this point in the history
  • Loading branch information
isacikgoz committed Dec 19, 2024
1 parent bcf1ae9 commit 63cf90c
Showing 1 changed file with 5 additions and 33 deletions.
38 changes: 5 additions & 33 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,15 @@ jobs:
test:
runs-on: ubuntu-22.04
if: ${{ github.event.label.name == 'Run Performance Tests' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ISSUE_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_ORG: ${{ github.repository_owner }}
GITHUB_REPO: ${{ github.repository }}
steps:
- name: ci/checkout-repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: ci/test
uses: ./.github/actions/test
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: test-artifcats-${{ github.run_id }}
path: pathToTestResults # Path to test results saved from the performance test
create-comment:
runs-on: ubuntu-22.04
needs: test
steps:
- name: Download test artifacts
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: test-artifcats-${{ github.run_id }}
path: pathToTestResults # Download the test results
- name: parse-results
run: |
# Parse test results if necessary
# Or if the output generted by the test is in a format that can be used to create a comment
# we can simply remove this step and use the output from the test durectly.
#
# Echo to github output
# echo "COMMENT_BODY=$(cat body.txt)" >> $GITHUB_OUTPUT
- name: Create comment
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: '${{ steps.parse-results.outputs.COMMENT_BODY }}'
})

0 comments on commit 63cf90c

Please sign in to comment.