Skip to content

Commit

Permalink
Merge pull request #5 from unifyai/test_comment
Browse files Browse the repository at this point in the history
test: comment display message
  • Loading branch information
a0m0rajab authored Sep 29, 2023
2 parents 3eaad44 + 723272b commit e6da3a8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
38 changes: 17 additions & 21 deletions .github/workflows/intelligent-tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

permissions:
actions: read
pull-requests: write
jobs:
display_test_results:
if: ${{ always() }}
Expand All @@ -24,40 +25,35 @@ jobs:
cat combined_test_results.txt
- name: New Failures Introduced
id: new_failures_results
run: |
find . -name "new_failures_*.txt" -exec cat {} + > combined_failures.txt
if [ -s combined_failures.txt ]
then
echo "This PR introduces the following new failing tests:"
cat combined_failures.txt
echo "This PR introduces the following new failing tests:\n\n"
cat combined_failures.txt
echo "MESSAGE=This PR does not introduced new failing tests! could you check them please!" >> "$GITHUB_OUTPUT"
else
echo "This PR does not introduce any new test failures! Yippee!"
echo "MESSAGE=This PR does not introduce any new test failures! Yippee!" >> "$GITHUB_OUTPUT"
fi
- name: comment tests on PR
uses: machine-learning-apps/pr-comment@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Write GitHub Comment
uses: actions/github-script@v6
with:
path: combined_failures.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Thanks for the PR, ${{ steps.new_failures_results.outputs.MESSAGE }}'
})
run_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branch: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
121, 122, 123, 124, 125, 126, 127, 128 ]
branch: [ 2, 3]

steps:
- name: Checkout Ivy 🛎
Expand Down
1 change: 1 addition & 0 deletions ivy/functional/backends/torch/activations.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def gelu(
approximate: bool = False,
complex_mode="jax",
out: Optional[torch.Tensor] = None,
test,
) -> torch.Tensor:
if approximate:
return (
Expand Down

0 comments on commit e6da3a8

Please sign in to comment.