From 58326445545c9199ff18430bee50f3f29d8bdb5e Mon Sep 17 00:00:00 2001 From: kitsuyui Date: Sat, 20 May 2023 00:18:01 +0900 Subject: [PATCH] Add CI --- .github/workflows/test-vrt.yml | 22 ++++++++++++++++++++++ examples/storybook/package.json | 2 +- package.json | 1 + turbo.json | 3 ++- 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test-vrt.yml diff --git a/.github/workflows/test-vrt.yml b/.github/workflows/test-vrt.yml new file mode 100644 index 00000000..c1837006 --- /dev/null +++ b/.github/workflows/test-vrt.yml @@ -0,0 +1,22 @@ +name: test +on: push +jobs: + test: + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: latest + cache: yarn + cache-dependency-path: yarn.lock + + - name: Install dependencies + run: yarn install + + - name: Test + run: yarn build + + - name: Visual Regression Test + run: yarn test:vrt diff --git a/examples/storybook/package.json b/examples/storybook/package.json index dc297698..b9e6629f 100644 --- a/examples/storybook/package.json +++ b/examples/storybook/package.json @@ -28,7 +28,7 @@ "scripts": { "start": "storybook dev -p 6006", "storybook": "storybook dev -p 6006", - "test": "playwright test", + "test:vrt": "playwright test", "build-storybook": "storybook build" } } diff --git a/package.json b/package.json index d3be7e79..51ed39fb 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "build": "turbo build", "test": "turbo test", "lint": "turbo lint", + "test:vrt": "turbo test:vrt", "format:prettier": "prettier --write .", "format:eslint": "eslint . --ext .js,.jsx,.ts,.tsx --ignore-path .gitignore --fix", "lint:prettier": "prettier --check .", diff --git a/turbo.json b/turbo.json index 5add638e..c768e507 100644 --- a/turbo.json +++ b/turbo.json @@ -10,6 +10,7 @@ }, "test": { "dependsOn": ["^test"] - } + }, + "test:vrt": {} } }