-
Notifications
You must be signed in to change notification settings - Fork 76
33 lines (27 loc) · 883 Bytes
/
pr-compliance.yml
File metadata and controls
33 lines (27 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: PR Compliance
on:
pull_request:
types: [opened, edited, synchronize, reopened]
jobs:
validate:
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
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
- name: Validate PR title, body and commits
run: |
python .github/scripts/validate_pr.py --checks all --verbose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}