0-0. Иванов Иван Иванович. 1234567890а. Проверка имени, описание и коммитов реквеста #4
Workflow file for this run
This file contains hidden or 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
name: PR Compliance | |
on: | |
pull_request: | |
types: [opened, edited, synchronize, reopened] | |
jobs: | |
unit_tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install coverage | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install coverage | |
- name: Run validator unit tests with coverage | |
run: | | |
coverage run -m unittest -v tests/test_validate_pr.py tests/test_validate_pr_main.py | |
coverage report --fail-under=100 -m .github/scripts/validate_pr.py | |
pr_title: | |
name: Validate PR Title | |
runs-on: ubuntu-latest | |
needs: [unit_tests] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Validate PR title | |
run: | | |
python .github/scripts/validate_pr.py --checks title --verbose | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
pr_body: | |
name: Validate PR Body | |
runs-on: ubuntu-latest | |
needs: [unit_tests] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Validate PR body | |
run: | | |
python .github/scripts/validate_pr.py --checks body --verbose | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
pr_commits: | |
name: Validate PR Commits | |
runs-on: ubuntu-latest | |
needs: [unit_tests] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Validate PR commits | |
run: | | |
python .github/scripts/validate_pr.py --checks commits --verbose | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |