Skip to content

Added python code changes regression testig workflow #4

Added python code changes regression testig workflow

Added python code changes regression testig workflow #4

name: Run Python Tests
on:
push:
branches-ignore: main
paths:
- "**/*.py"
pull_request:
branches-ignore: 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
cache: "pip"
cache-dependency-path: requirements.txt
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc libglu1-mesa libgl1 ffmpeg libsm6 libxext6 libxft-dev libxinerama-dev
- name: Install Python 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.'
})