Skip to content

Commit

Permalink
changes (#9947)
Browse files Browse the repository at this point in the history
  • Loading branch information
abidlabs authored Nov 13, 2024
1 parent a966e9f commit 213b038
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Before your create a PR, please check to see if there is [an existing issue](htt

Not adhering to this guideline will result in the PR being closed.

## Tests
## Testing and Formatting Your Code

1. PRs will only be merged if tests pass on CI. To run the tests locally, please set up [your Gradio environment locally](https://github.com/gradio-app/gradio/blob/main/CONTRIBUTING.md) and run the tests: `bash scripts/run_all_tests.sh`
1. PRs will only be merged if tests pass on CI. We recommend at least running the backend tests locally, please set up [your Gradio environment locally](https://github.com/gradio-app/gradio/blob/main/CONTRIBUTING.md) and run the backed tests: `bash scripts/run_backend_tests.sh`

2. You may need to run the linters: `bash scripts/format_backend.sh` and `bash scripts/format_frontend.sh`
2. Please run these bash scripts to automatically format your code: `bash scripts/format_backend.sh`, and (if you made any changes to non-Python files) `bash scripts/format_frontend.sh`

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ We use Pytest, Playwright and Vitest to test our code.
- The Python tests are located in `/test`. To run these tests:

```
bash scripts/run_all_tests.sh
bash scripts/run_backend_tests.sh
```

- The frontend unit tests are any defined with the filename `*.test.ts`. To run them:
Expand Down
6 changes: 0 additions & 6 deletions scripts/run_all_tests.sh

This file was deleted.

6 changes: 6 additions & 0 deletions scripts/run_backend_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash -eu

cd "$(dirname ${0})/.."

echo "Running the backend unit tests..."
python -m pytest test -m "not flaky"

0 comments on commit 213b038

Please sign in to comment.