From bbcdeea91f9b3952593b59bc9e5fb5f5c2efbd49 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 19 May 2020 09:05:08 +0200 Subject: [PATCH 1/5] build(deps-dev): bump @types/webpack from 4.41.12 to 4.41.13 (#910) Bumps [@types/webpack](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webpack) from 4.41.12 to 4.41.13. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webpack) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 103fb2ab9d..a9fb4b171d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4394,9 +4394,9 @@ source-map "^0.6.1" "@types/webpack@*", "@types/webpack@^4.41.7": - version "4.41.12" - resolved "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.12.tgz#0386ee2a2814368e2f2397abb036c0bf173ff6c3" - integrity sha512-BpCtM4NnBen6W+KEhrL9jKuZCXVtiH6+0b6cxdvNt2EwU949Al334PjQSl2BeAyvAX9mgoNNG21wvjP3xZJJ5w== + version "4.41.13" + resolved "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.13.tgz#988d114c8913d039b8a0e0502a7fe4f1f84f3d5e" + integrity sha512-RYmIHOWSxnTTa765N6jJBVE45pd2SYNblEYshVDduLw6RhocazNmRzE5/ytvBD8IkDMH6DI+bcrqxh8NILimBA== dependencies: "@types/anymatch" "*" "@types/node" "*" From f8cdfdb1aa8f1206f01b7feced61576c2558e2ab Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 19 May 2020 09:05:36 +0200 Subject: [PATCH 2/5] build(deps-dev): bump tsc-watch from 4.2.5 to 4.2.6 (#911) Bumps [tsc-watch](https://github.com/gilamran/tsc-watch) from 4.2.5 to 4.2.6. - [Release notes](https://github.com/gilamran/tsc-watch/releases) - [Changelog](https://github.com/gilamran/tsc-watch/blob/master/CHANGELOG.md) - [Commits](https://github.com/gilamran/tsc-watch/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index a9fb4b171d..fb73cae0bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19476,9 +19476,9 @@ ts-pnp@^1.1.2: integrity sha512-CrG5GqAAzMT7144Cl+UIFP7mz/iIhiy+xQ6GGcnjTezhALT02uPMRw7tgDSESgB5MsfKt55+GPWw4ir1kVtMIQ== tsc-watch@^4.2.3: - version "4.2.5" - resolved "https://registry.npmjs.org/tsc-watch/-/tsc-watch-4.2.5.tgz#3ee680cfd02087bb76cbecd2d5f290a0d6302454" - integrity sha512-scXpL5SFJevvtKOtQIRxJvyEwCKSIZS9bDrO/cy/dWlETTVwSlfRm2WmakdRPM0Rg90DbYyJjkUr2z74HXcxzQ== + version "4.2.6" + resolved "https://registry.npmjs.org/tsc-watch/-/tsc-watch-4.2.6.tgz#c0903e9f15a882b78481d80cba170731b7fe2779" + integrity sha512-YLWyWFrL6mmA13yveULg1bJYrizlkTjqJ4d6Fi3dCgxbfK6jE8HcqoFHKLAsP5mWn0PKhOEf3hhqE7Egjpflfg== dependencies: cross-spawn "^5.1.0" node-cleanup "^2.1.2" From 9dd563e3a9c90d4558010d91571bcc48362e86c5 Mon Sep 17 00:00:00 2001 From: nikek Date: Tue, 19 May 2020 10:04:58 +0200 Subject: [PATCH 3/5] Make stories deterministic for snapshot testing --- packages/core/src/components/Table/Table.stories.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/components/Table/Table.stories.tsx b/packages/core/src/components/Table/Table.stories.tsx index 7164f9b730..bf2c5a3fc7 100644 --- a/packages/core/src/components/Table/Table.stories.tsx +++ b/packages/core/src/components/Table/Table.stories.tsx @@ -31,8 +31,8 @@ const generateTestData: (number: number) => Array<{}> = (rows = 10) => { col1: `Some value ${data.length}`, col2: `More data ${data.length}`, subvalue: `Subvalue ${data.length}`, - number: Math.floor(Math.random() * 1000), - date: new Date(Math.random() * 10000000000000), + number: Math.round(Math.abs(Math.sin(data.length)) * 1000), + date: new Date(Math.abs(Math.sin(data.length)) * 10000000000000), }); } From f1dcd5303851a06b9ae2f714af8b5e834f1f72b7 Mon Sep 17 00:00:00 2001 From: nikek Date: Mon, 18 May 2020 16:43:12 +0200 Subject: [PATCH 4/5] add github workflow for chromatic storybook UI testing/reviewing --- .../workflows/chromatic-storybook-test.yml | 22 +++++++++++++++++++ package.json | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/chromatic-storybook-test.yml diff --git a/.github/workflows/chromatic-storybook-test.yml b/.github/workflows/chromatic-storybook-test.yml new file mode 100644 index 0000000000..9ba600ed6b --- /dev/null +++ b/.github/workflows/chromatic-storybook-test.yml @@ -0,0 +1,22 @@ +name: 'test chromatic' +on: + pull_request: + paths: + - '.github/workflows/chromatic-storybook-test.yml' + - 'packages/storybook/**' + - 'packages/core/src/components/**' + - 'packages/core/src/layout/**' + +jobs: + chromatic: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Required to retrieve git history + - run: yarn install + - uses: chromaui/action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + storybookBuildDir: 'packages/storybook/dist' diff --git a/package.json b/package.json index e5028bfd2f..c88292b043 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "release": "if [ \"$(git symbolic-ref --short HEAD)\" = master ]; then echo \"don't try to release master\"; exit 1; else lerna version --no-push; fi", "lerna": "lerna", "postinstall": "patch-package", - "storybook": "yarn workspace storybook start" + "storybook": "yarn workspace storybook start", + "build-storybook": "yarn workspace storybook build-storybook" }, "workspaces": { "packages": [ From a3adfc79fce9f094e1f84371e2ddaad5ebe00ab5 Mon Sep 17 00:00:00 2001 From: nikek Date: Mon, 18 May 2020 16:53:55 +0200 Subject: [PATCH 5/5] manually build storybook before the chromatic action --- .github/workflows/chromatic-storybook-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/chromatic-storybook-test.yml b/.github/workflows/chromatic-storybook-test.yml index 9ba600ed6b..34c3c9f7d6 100644 --- a/.github/workflows/chromatic-storybook-test.yml +++ b/.github/workflows/chromatic-storybook-test.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # Required to retrieve git history - - run: yarn install + - run: yarn install && yarn build-storybook - uses: chromaui/action@v1 with: token: ${{ secrets.GITHUB_TOKEN }}