Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 14 additions & 56 deletions .github/workflows/api-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,60 +6,18 @@ on:
- main
pull_request:

jobs:
changed-modules:
name: Determine Changed Modules
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
modules-json: ${{ steps.changed-modules.outputs.modules-json }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Changed modules
id: changed-modules
uses: smartcontractkit/.github/actions/changed-modules-go@changed-modules-go/v1
with:
file-patterns: |
**/*.go
**/go.mod
**/go.sum
module-patterns: |
**

analyze-api-changes:
if: ${{ needs.changed-modules.outputs.modules-json != '[]' }}
name: Analyze (${{ matrix.module }})
runs-on: ubuntu-latest
needs: changed-modules
permissions:
pull-requests: write
contents: read
strategy:
fail-fast: false
matrix:
module: ${{ fromJson(needs.changed-modules.outputs.modules-json) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v5
with:
fetch-depth: 0
permissions:
contents: read
pull-requests: write

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: ${{ matrix.module }}/go.mod
cache: false

- uses: smartcontractkit/.github/actions/apidiff-go@apidiff-go/v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
module-directory: ${{ matrix.module }}
enforce-compatible: false
post-comment: true
jobs:
api-diff:
uses: smartcontractkit/.github/.github/workflows/reusable-apidiff-go-analysis.yml@reusable-apidiff-go-analysis/v1
with:
file-patterns: |
**/*.go
**/go.mod
**/go.sum
module-patterns: |
**
enforce-compatible: ${{ !contains(github.event.pull_request.labels.*.name, 'allow-incompatible') }}
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment thread
erikburt marked this conversation as resolved.
Loading