Skip to content

Commit

Permalink
Add test comment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nvdaes committed Apr 19, 2021
1 parent b66e908 commit db4dc84
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/testComment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Locust summary

on: [ pull_request_target ]

jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: PR head repo
id: head_repo_name
run: |
HEAD_REPO_NAME=$(jq -r '.pull_request.head.repo.full_name' "$GITHUB_EVENT_PATH")
echo "PR head repo: $HEAD_REPO_NAME"
echo "::set-output name=repo::$HEAD_REPO_NAME"
- name: Checkout git repo
uses: actions/checkout@v2
with:
repository: ${{ steps.head_repo_name.outputs.repo }}
fetch-depth: 0
- name: Generate Locust summary
uses: simiotics/locust-action@main
id: locust
with:
format: html-github
- name: Comment on PR
uses: actions/github-script@v3
with:
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '${{ steps.locust.outputs.summary }}',
})

0 comments on commit db4dc84

Please sign in to comment.