Skip to content

Commit

Permalink
chore: Use griffe to catch breaking API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Jul 16, 2024
1 parent 70016c8 commit a731a68
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/api-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: API Changes

on:
pull_request:
paths:
- singer_sdk/**
- .github/workflows/api-changes.yml
- CHANGELOG.md
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions: # added using https://github.com/step-security/secure-repo
contents: read

jobs:
check-api-changes:
name: Check API Changes
runs-on: ubuntu-latest
env:
NOXSESSION: api
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install tools
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
python -Im pip install -U pip
pipx install griffe nox
pipx list
- name: Set REF
id: set-ref
if: always() && !startsWith(github.head_ref, 'release/')
run: |
echo "ref=${{ github.event.pull_request.base.sha }}" >> $GITHUB_OUTPUT
# Check API against the latest commit on the base branch
- name: Run Nox
run: |
nox -- ${{ steps.set-ref.outputs.ref }}
1 change: 1 addition & 0 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
griffe==0.48.0
pip==24.1.2
poetry==1.8.3
poetry-plugin-export==1.8.0
Expand Down

0 comments on commit a731a68

Please sign in to comment.