-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Support for Manual Testing [skip ci]
- Loading branch information
1 parent
7a52f4d
commit 622e332
Showing
2 changed files
with
60 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: manual-tests | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
test: | ||
description: 'Test:' | ||
default: 'ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py::test_torch_instance_arctan_,tensorflow' | ||
required: true | ||
permissions: | ||
actions: read | ||
jobs: | ||
run_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Ivy 🛎 | ||
uses: actions/checkout@v2 | ||
with: | ||
path: ivy | ||
persist-credentials: false | ||
submodules: "recursive" | ||
|
||
- name: Get Job URL | ||
uses: Tiryoh/gha-jobid-action@v0 | ||
id: jobs | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
job_name: ${{ github.job }} | ||
|
||
- name: Run Tests | ||
id: tests | ||
run: | | ||
pip install pymongo | ||
cd ivy | ||
python setup_tests.py ${{ github.event.inputs.name }} | ||
python run_tests.py ${{ secrets.REDIS_CONNECTION_URL }} ${{ secrets.REDIS_PASSWORD }} ${{ secrets.MONGODB_PASSWORD }} ${{ steps.jobs.outputs.html_url }} | ||
continue-on-error: true | ||
|
||
- name: Check on failures | ||
if: steps.tests.outcome != 'success' | ||
run: exit 1 |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import sys | ||
|
||
BACKENDS = ["numpy", "jax", "tensorflow", "torch"] | ||
|
||
|
||
def main(): | ||
if len(sys.argv) < 2: | ||
return | ||
test = sys.argv[1] | ||
if "," in test: | ||
with open("tests_to_run", "w") as f: | ||
f.write(test + "\n") | ||
else: | ||
with open("tests_to_run", "w") as f: | ||
for backend in BACKENDS: | ||
f.write(f"{test},{backend}\n") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |