Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: comment display message #5

Merged
merged 14 commits into from
Sep 29, 2023
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
Loading