-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: test commenting of new baselines
- Loading branch information
Showing
3 changed files
with
55 additions
and
21 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
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
contents: write | ||
pull-requests: write | ||
env: | ||
username: ${{ github.event.pull_request.user.login }} | ||
username: ${{ github.event.pull_request.user.login }} # ${{ github.event.comment.user.login }} | ||
|
||
steps: | ||
# - name: Get PR branch | ||
|
@@ -46,7 +46,25 @@ jobs: | |
run: | | ||
git config --global user.name '$username' | ||
git config --global user.email '[email protected]' | ||
mv tests/regression_test_baselines.json tests/regression_test_baselines.json.bak | ||
NEW_BASELINE=1 pytest -m regression | ||
- name: Add comment to PR | ||
uses: actions/github-script@v7 | ||
if: always() | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const fs = require('fs'); | ||
const TestReport = fs.readFileSync('regression_test_report.txt', 'utf8'); | ||
await github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `## New Baselines \n\`\`\`\n${TestReport}\n\`\`\`` | ||
}); | ||
- name: Commit and push | ||
if: github.event.pull_request.base.ref == 'main' | ||
|
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