-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ViNN280801 <vladislav_semykin01@mail.ru>
- Loading branch information
1 parent
fffe27e
commit a4699d0
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
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,47 @@ | ||
name: Run Python Tests | ||
|
||
on: | ||
push: | ||
branches-ignore: main | ||
paths: | ||
- "**/*.py" | ||
pull_request: | ||
branches: main | ||
paths: | ||
- "**/*.py" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run_python_tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run Python tests | ||
run: | | ||
python ui/run_tests.py | ||
- name: Notify author on success | ||
if: success() && github.event_name == 'pull_request' | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
github.issues.createComment({ | ||
issue_number: context.payload.pull_request.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: '@ViNN280801 All Python tests have passed successfully. Please review the changes and proceed with the next steps if everything looks good.' | ||
}) |