[WIP] Restraints API #188
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
name: Check for API breaks | |
on: | |
pull_request_target: | |
branches: | |
- main | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Check for API breaks | |
continue-on-error: true | |
id: check | |
run: | | |
pip install griffe | |
griffe check "openfe" --verbose | |
- name: Post Comment on Failure | |
if: steps.check.outcome == 'failure' | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const prNumber = context.payload.pull_request.number; | |
github.rest.issues.createComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: prNumber, | |
body: '🚨 API breaking changes detected! 🚨' | |
}); |