Skip to content

Commit

Permalink
Verify changeset for every changed package
Browse files Browse the repository at this point in the history
  • Loading branch information
jandrade committed Sep 27, 2023
1 parent ebaf079 commit 327dbc5
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions .github/workflows/node-ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,37 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

changeset:
name: Check for .changeset entries for all changed files
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get changed files
uses: Khan/actions@get-changed-files-v1
id: changed

- name: Filter out files that don't need a changeset
uses: Khan/actions@filter-files-v0
id: match
with:
changed-files: ${{ steps.changed.outputs.files }}
files: packages/ # Only look for changes in packages
globs: "!(**/__tests__/*), !(**/dist/*)" # Ignore test files

- name: Verify changeset entries
uses: Khan/changeset-per-package@v1.0.1
with:
changed_files: ${{ steps.match.outputs.filtered }}

lint:
name: Lint
needs: prime_cache_primary
Expand Down Expand Up @@ -95,15 +126,6 @@ jobs:
- name: Check package.json files
run: node utils/publish/pre-publish-check-ci.js

# We don't need changesets for infrastructure-type files (tests, stories,
# etc).
- uses: Khan/actions@check-for-changeset-v0
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
with:
exclude: .github/,.storybook/
exclude_extensions: .test.ts, .test.tsx, .stories.ts, .stories.tsx, .mdx
exclude_globs: "**/__tests__/*, **/__docs__/*"

test:
name: Test
needs: prime_cache_primary
Expand Down

0 comments on commit 327dbc5

Please sign in to comment.