Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify changeset for every changed package #2071

Merged
merged 1 commit into from
Sep 28, 2023
Merged
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
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
Loading