From a522cf76971d6006be6898d28e3c984c9dc40659 Mon Sep 17 00:00:00 2001 From: Une Sofie Kinn Ekroll Date: Fri, 8 Nov 2024 09:50:25 +0100 Subject: [PATCH] ci: check for API changes in @digdir/designsystemet --- .github/workflows/test.yml | 3 +++ package.json | 3 ++- packages/cli/package.json | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e44e784bfc..e2153b1a4e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,6 +42,9 @@ jobs: - name: Test CLI (create tokens, then build the theme) run: yarn test:cli + - name: CLI - Check for changes in the API + run: yarn report:cli-api + - name: Install Playwright run: npx playwright install --with-deps - name: Build storybook diff --git a/package.json b/package.json index 48cc7a8c79..6e9440b724 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "types:storefront": "yarn workspace storefront types", "version-packages": "changeset version", "publish": "yarn build && changeset publish", - "chromatic": "yarn workspace @designsystemet/storybook chromatic" + "chromatic": "yarn workspace @designsystemet/storybook chromatic", + "report:cli-api": "yarn workspace @digdir/designsystemet api-report" }, "devDependencies": { "@biomejs/biome": "1.9.3", diff --git a/packages/cli/package.json b/packages/cli/package.json index 95c0f81e20..1ae87b4cb9 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -42,7 +42,8 @@ "test": "yarn test:tokens-create-and-build", "clean": "rimraf dist", "clean:theme": "yarn workspace @digdir/designsystemet-theme clean", - "update:template": "tsx ./src/tokens/template.ts" + "update:template": "tsx ./src/tokens/template.ts", + "api-report": "api-extractor run" }, "dependencies": { "@adobe/leonardo-contrast-colors": "^1.0.0",