From db48d1cf1877008a6e35345ee1bfbc039f3c2550 Mon Sep 17 00:00:00 2001 From: adrien guernier Date: Wed, 28 Aug 2024 22:53:52 +0200 Subject: [PATCH] chore: add storybook ci --- .github/workflows/storybook-tests.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/storybook-tests.yml diff --git a/.github/workflows/storybook-tests.yml b/.github/workflows/storybook-tests.yml new file mode 100644 index 0000000..42f88ed --- /dev/null +++ b/.github/workflows/storybook-tests.yml @@ -0,0 +1,22 @@ +name: 'Storybook Tests' +on: push +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - name: Install dependencies + run: npm + - name: Install Playwright + run: npx playwright install --with-deps + - name: Build Storybook + run: npm run storybook:build --quiet + - name: Serve Storybook and run tests + run: | + npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ + "npx http-server storybook-static --port 6006 --silent" \ + "npx wait-on tcp:6006 && yarn storybook:test" \ No newline at end of file